MAPSERVER=new Array("tile21.mqcdn.com","tile22.mqcdn.com","tile23.mqcdn.com","tile24.mqcdn.com");
HYBSERVER=new Array("tile21.mqcdn.com","tile22.mqcdn.com","tile23.mqcdn.com","tile24.mqcdn.com");
SATSERVER=new Array("tile21.mqcdn.com","tile22.mqcdn.com","tile23.mqcdn.com","tile24.mqcdn.com");
RESSERVER="tile21.mqcdn.com";
LOGSERVER="btilelog.access.mapquest.com";
STATICSERVER="btileprint.access.mapquest.com";
TRAFFSERVER="btraffic.access.mapquest.com";
IsDotCom=false;


//Prototype inclusion no longer supported;
document.write("<link rel='stylesheet' href='" + 'http://btilelog.access.mapquest.com/tilelog/transaction?transaction=script&key=mjtd%7Clu6tn10znl%2Caa%3Do5-lw2gg&v=5.3.0&itkcss=true'.replace(/^http:/, location.protocol) + "' type='text/css'  charset='iso-8859-1'/>");
Key="mjtd%7Clu6tn10znl%2Caa%3Do5-lw2gg";
if(typeof (MQA)=="undefined"){
MQA=new Object();
}
if(window.location.protocol=="https:"){
MAPSERVER=new Array("tile21-s.mqcdn.com","tile22-s.mqcdn.com","tile23-s.mqcdn.com","tile24-s.mqcdn.com");
HYBSERVER=new Array("tile21-s.mqcdn.com","tile22-s.mqcdn.com","tile23-s.mqcdn.com","tile24-s.mqcdn.com");
SATSERVER=new Array("tile21-s.mqcdn.com","tile22-s.mqcdn.com","tile23-s.mqcdn.com","tile24-s.mqcdn.com");
RESSERVER="tile21-s.mqcdn.com";
}
MQA={PIXERSPERLATDEGREE:315552459.661917,PIXERSPERLNGDEGREE:250344597.90989706,TILESIZE:256,SLIDESTEPS:9,SLIDEDELAY:11,SCALES:new Array(0,88011773,29337258,9779086,3520471,1504475,701289,324767,154950,74999,36000,18000,9000,4700,2500,1500,1000),MODS:new Array(0,4,12,36,100,234,502,1084,2272,4694,9778,19558,39116,74900,140818,234698,352047),VENDORLIST:new Array("","mz1copy.gif","mz4copy.gif","mz7copy.gif","mz0copy.gif"),MAPVENDORS:new Array(0,1,1,1,2,2,2,3,3,3,4,4,4,4,4,4,4),CORNER_TOPLEFT:0,CORNER_TOPRIGHT:1,CORNER_BOTTOMLEFT:2,CORNER_BOTTOMRIGHT:3,LOGO_MQ_LOGO:0,LOGO_MQ_SCALES:1,LOGO_MQ_COPY:2,LOGO_NT_COPY:3,LOGO_I3_COPY:4,LOGO_MAP_COPY:3,LOGO_SAT_COPY:4,EVENT_NONE:-1,EVENT_CLICK:0,EVENT_DBLCLICK:1,OPER_RECENTER:0,OPER_RECENTERZOOM:1,MAXMAPHEIGHT:7168,MAXMAPWIDTH:7168,BUTTON_MQ_LEFT:0,BUTTON_MQ_MIDDLE:1,BUTTON_MQ_RIGHT:2,MASTER_BROKER:null,SAFARI_BROWSER:(navigator.userAgent.indexOf("Safari")>=0),PAN_NORTH:0,PAN_SOUTH:1,PAN_EAST:2,PAN_WEST:3,CONTROL_PANZOOM:0,CONTROL_PAN:1,CONTROL_ZOOM:2,CONTROL_TYPE:3,CONTROL_TRAFFIC:4};
MQA.SURFACE_OFFSET=2*MQA.TILESIZE;
MQA.PROTOCOL=window.location.protocol;
MQA.RESOURCES=MQA.PROTOCOL+"//"+RESSERVER+"/res/";
MQA.STATICRESOURCES=MQA.PROTOCOL+"//"+STATICSERVER+"/tileprint.php";
MQA.IMGHOST=(MQA.PROTOCOL=="https:")?"api":"img";
MQA.NOTHING=MQA.RESOURCES+"nothing.gif";
MQA.MAP_TYPE={MAP:"map",SAT:"sat",HYB:"hyb",NONE:"none"};
MQA.TILE_LAYER_ID={MAP:"mqmaptilediv",SAT:"mqsattilediv",HYB:"mqhybtilediv"};
MQA.TILE_LAYER_TYPE={MAP:1,SAT:2,STRLBL:3,HOODPOLY:4,PARCEL:5};

if(typeof (MQA)=="undefined"){
MQA=new Object();
}
if(typeof (MQA.Common)=="undefined"){
MQA.Common=new Object();
}
MQA.createXMLDoc=function(_1){
var _2;
if(document.implementation.createDocument){
var _3=new window.DOMParser();
if(MQA.BrowserInfo.isSafari){
_1=_1.replace(/&/g,"&amp;");
}
_2=_3.parseFromString(_1,"text/xml");
}else{
if(window.ActiveXObject){
_2=new window.ActiveXObject("Microsoft.XMLDOM");
_2.async="false";
_2.loadXML(_1);
}
}
return _2;
};
mqCreateXMLDoc=MQA.createXMLDoc;
MQA.createXMLDocFromNode=function(_4){
var _5;
_4=_4.documentElement;
if(document.implementation.createDocument){
var _5=document.implementation.createDocument("","",null);
try{
_5.appendChild(_5.importNode(_4,true));
}
catch(error){
alert(error);
alert(_4.nodeName);
}
}else{
if(window.ActiveXObject){
_5=new ActiveXObject("Microsoft.XMLDOM");
_5.async="false";
_5.loadXML(_4.xml);
}
}
return _5;
};
mqCreateXMLDocFromNode=MQA.createXMLDocFromNode;
MQA.Browser=function(){
this.name=null;
this.version=null;
this.os=null;
this.appname=null;
this.appVersion=null;
this.vMajor=null;
this.isNS=null;
this.isNS4=null;
this.isNS6=null;
this.isIE=null;
this.isIE4=null;
this.isIE5=null;
this.isDOM=null;
this.isSafari=null;
this.platform=null;
};
MQBrowser=MQA.Browser;
MQA.getBrowserInfo=function(){
var _6=new MQA.Browser();
_6.name=_6.version=_6.os="unknown";
var _7=window.navigator.userAgent.toLowerCase();
var _8=window.navigator.appName;
var _9=window.navigator.appVersion;
var _a=new Array("firefox","msie","netscape","opera","safari");
var _b=new Array("linux","mac","windows","x11");
var _c=_a.length;
var _d="";
for(var i=0,n=_c;i<n;i++){
_d=_7.indexOf(_a[i])+1;
if(_d>0){
_6.name=_a[i];
var _10=_d+_6.name.length;
var _11=((_6.name=="safari")||(_7.charAt(_10+4)>0&&_7.charAt(_10+4)<9))?5:3;
_6.version=_7.substring(_10,_10+_11);
}
}
var _12=_b.length;
for(var j=0,m=_12;j<m;j++){
_d=_7.indexOf(_b[j])+1;
if(_d>0){
_6.os=_b[j];
}
}
if(_8=="Netscape"){
_6.appname="ns";
}else{
if(_8=="Microsoft Internet Explorer"){
_6.appname="ie";
}
}
_6.appVersion=_9;
_6.vMajor=parseInt(_6.appVersion);
_6.isNS=(_6.appname=="ns"&&_6.vMajor>=4);
_6.isNS4=(_6.appname=="ns"&&_6.vMajor==4);
_6.isNS6=(_6.appname=="ns"&&_6.vMajor==5);
_6.isIE=(_6.appname=="ie"&&_6.vMajor>=4);
_6.isIE4=(_6.appVersion.indexOf("MSIE 4")>0);
_6.isIE5=(_6.appVersion.indexOf("MSIE 5")>0);
_6.isDOM=(document.createElement&&document.appendChild&&document.getElementsByTagName)?true:false;
_6.isSafari=(_6.name=="safari");
if(_7.indexOf("win")>-1){
_6.platform="win";
}else{
if(_7.indexOf("mac")>-1){
_6.platform="mac";
}else{
_6.platform="other";
}
}
return _6;
};
mqGetBrowserInfo=MQA.getBrowserInfo;
MQA.BrowserInfo=MQA.getBrowserInfo();
MQA.Object=function(){
var _15=null;
this.getM_XmlDoc=function(){
return _15;
};
this.setM_XmlDoc=function(_16){
_15=_16;
};
var _17=null;
this.getM_Xpath=function(){
return _17;
};
this.setM_Xpath=function(_18){
_17=_18;
};
};
MQA.Object.prototype.getClassName=function(){
return "MQObject";
};
MQA.Object.prototype.getObjectVersion=function(){
return 0;
};
MQA.Object.prototype.setProperty=function(_19,_1a){
var _1b;
if(_19!==null){
_1b="/"+this.getM_Xpath()+"/"+_19;
}else{
_1b="/"+this.getM_Xpath();
}
var _1c=mqSetNodeText(this.getM_XmlDoc(),_1b,_1a);
if(_1c===null){
var _1d=this.getM_XmlDoc().createElement(_19);
var _1e=this.getM_XmlDoc().documentElement.appendChild(_1d);
_1c=mqSetNodeText(this.getM_XmlDoc(),_1b,_1a);
}
return _1c;
};
MQA.Object.prototype.getProperty=function(_1f){
var _20;
if(_1f!==null){
_20="/"+this.getM_Xpath()+"/"+_1f;
}else{
_20="/"+this.getM_Xpath();
}
return mqGetXPathNodeText(this.getM_XmlDoc(),_20);
};
MQA.Object.prototype.copy=function(){
var cp=new this.constructor;
cp.loadXml(this.saveXml());
return cp;
};
MQA.Object.prototype.internalCopy=function(obj){
var _23="<"+obj.getM_Xpath();
if(this.getObjectVersion()>0){
_23=_23+" Version=\""+this.getObjectVersion()+"\"";
}
_23=_23+">";
var _24=this.getM_XmlDoc().documentElement;
var _25=_24.childNodes;
var _26=_25.length;
for(var _27=0;_27<_26;_27++){
_23=_23+mqXmlToStr(_25[_27]);
}
_23=_23+"</"+obj.getM_Xpath()+">";
var cp=new this.constructor;
cp.loadXml(_23);
return cp;
};
MQObject=MQA.Object;
MQA.Point=function(_29,_2a){
this.x=0;
this.y=0;
this.setM_Xpath("Point");
if(arguments.length==1){
this.setM_Xpath(_29);
}else{
if(arguments.length==2){
this.x=parseInt(_29);
this.y=parseInt(_2a);
if(isNaN(this.x)||isNaN(this.y)){
throw new Error("1MQPoint constructor called with invalid parameter");
}
}else{
if(arguments.length>2){
throw new Error("MQPoint constructor called with "+arguments.length+" arguments, but it expects 0, 1, or 2 arguments");
}
}
}
};
MQA.Point.prototype=new MQA.Object();
MQA.Point.prototype.constructor=MQA.Point;
MQA.Point.prototype.getClassName=function(){
return "MQPoint";
};
MQA.Point.prototype.getObjectVersion=function(){
return 0;
};
MQA.Point.prototype.loadXml=function(_2b){
if("undefined"!==typeof (mqutils)){
this.setM_XmlDoc(MQA.createXMLDoc(_2b));
this.x=this.getProperty("X");
this.y=this.getProperty("Y");
}
};
MQA.Point.prototype.saveXml=function(){
return "<"+this.getM_Xpath()+"><X>"+this.x+"</X><Y>"+this.y+"</Y></"+this.getM_Xpath()+">";
};
MQA.Point.prototype.setX=function(x){
this.x=parseInt(x);
if(isNaN(this.x)){
throw new Error("MQPoint.setX called with invalid parameter");
}
};
MQA.Point.prototype.getX=function(){
return this.x;
};
MQA.Point.prototype.setY=function(y){
this.y=parseInt(y);
if(isNaN(this.y)){
throw new Error("MQPoint.setY called with invalid parameter");
}
};
MQA.Point.prototype.getY=function(){
return this.y;
};
MQA.Point.prototype.setXY=function(x,y){
this.x=parseInt(x);
this.y=parseInt(y);
if(isNaN(this.x)||isNaN(this.y)){
throw new Error("MQPoint.setXY called with invalid parameter");
}
};
MQA.Point.prototype.valid=function(){
if("undefined"!==typeof (mqutils)){
return (Math.abs(this.x!=MQCONSTANT.MQPOINT_INVALID)&&Math.abs(this.y!=MQCONSTANT.MQPOINT_INVALID));
}
return false;
};
MQA.Point.prototype.equals=function(pt){
if(pt){
return (this.x===pt.x&&this.y===pt.y);
}
return false;
};
MQA.Point.prototype.toString=function(){
return this.x+","+this.y;
};
MQPoint=MQA.Point;
MQA.LatLng=function(_31,_32){
MQA.Object.call(this);
this.lat=0;
this.lng=0;
this.setM_Xpath("LatLng");
if(arguments.length==1){
this.setM_Xpath(_31);
}else{
if(arguments.length==2){
this.lat=parseFloat(_31);
this.lng=parseFloat(_32);
if(isNaN(this.lat)||isNaN(this.lng)){
throw new Error("MQA.LatLng constructor called with invalid parameter");
}
}else{
if(arguments.length>2){
throw new Error("MQA.LatLng constructor called with "+arguments.length+" arguments, but it expects 0, 1, or 2 arguments.");
}
}
}
};
MQA.LatLng.prototype=new MQA.Object();
MQA.LatLng.prototype.constructor=MQA.LatLng;
MQA.LatLng.prototype.getClassName=function(){
return "MQLatLng";
};
MQA.LatLng.prototype.getObjectVersion=function(){
return 0;
};
MQA.LatLng.prototype.loadXml=function(_33){
if("undefined"!==typeof (mqutils)){
this.setM_XmlDoc(MQA.createXMLDoc(_33));
this.lat=this.getProperty("Lat");
this.lng=this.getProperty("Lng");
}
};
MQA.LatLng.prototype.saveXml=function(){
return "<"+this.getM_Xpath()+"><Lat>"+this.lat+"</Lat><Lng>"+this.lng+"</Lng></"+this.getM_Xpath()+">";
};
MQA.LatLng.prototype.setLatitude=function(_34){
this.lat=parseFloat(_34);
if(isNaN(this.lat)){
throw new Error("MQA.LatLng.setLatitude called with invalid parameter");
}
};
MQA.LatLng.prototype.getLatitude=function(){
return this.lat;
};
MQA.LatLng.prototype.setLongitude=function(_35){
this.lng=parseFloat(_35);
if(isNaN(this.lng)){
throw new Error("MQA.LatLng.setLongitude called with invalid parameter");
}
};
MQA.LatLng.prototype.getLongitude=function(){
return this.lng;
};
MQA.LatLng.prototype.setLatLng=function(_36,_37){
this.lat=parseFloat(_36);
this.lng=parseFloat(_37);
if(isNaN(this.lat)||isNaN(this.lng)){
throw new Error("MQA.LatLng.setLatLng called with invalid parameter");
}
};
MQA.LatLng.prototype.arcDistance=function(ll2,_39){
if("undefined"!==typeof (mqutils)){
if(ll2){
if(ll2.getClassName()!=="MQLatLng"){
alert("failure in arcDistance");
throw "failure in arcDistance";
}
}else{
alert("failure in arcDistance");
throw "failure in arcDistance";
}
if(_39){
mqIsClass("MQDistanceUnits",_39,false);
}else{
_39=new MQDistanceUnits(MQCONSTANT.MQDISTANCEUNITS_MILES);
}
if(this.getLatitude()==ll2.getLatitude()&&this.getLongitude()==ll2.getLongitude()){
return 0;
}
var _3a=ll2.getLongitude()-this.getLongitude();
var a=MQCONSTANT.MQLATLNG_RADIANS*(90-this.getLatitude());
var c=MQCONSTANT.MQLATLNG_RADIANS*(90-ll2.getLatitude());
var _3d=(Math.cos(a)*Math.cos(c))+(Math.sin(a)*Math.sin(c)*Math.cos(MQCONSTANT.MQLATLNG_RADIANS*(_3a)));
var _3e=(_39.getValue()===MQCONSTANT.MQDISTANCEUNITS_MILES)?3963.205:6378.160187;
if(_3d<-1){
return MQCONSTANT.PI*_3e;
}else{
if(_3d>=1){
return 0;
}else{
return Math.acos(_3d)*_3e;
}
}
}
return -1;
};
MQA.LatLng.prototype.valid=function(){
if("undefined"!==typeof (mqutils)){
return (Math.abs(this.getLatitude()-MQCONSTANT.MQLATLNG_INVALID)>MQCONSTANT.MQLATLNG_TOLERANCE&&Math.abs(this.getLongitude()-MQCONSTANT.MQLATLNG_INVALID)>MQCONSTANT.MQLATLNG_TOLERANCE);
}
return false;
};
MQA.LatLng.prototype.equals=function(ll){
if(ll!==null){
return (this.getLongitude()===ll.getLongitude()&&this.getLatitude()===ll.getLatitude());
}
return false;
};
MQA.LatLng.prototype.toString=function(){
return this.lat+","+this.lng;
};
MQLatLng=MQA.LatLng;
MQA.XMLDOC=function(){
this.AUTOGEOCODECOVSWITCH=null;
this.AUTOROUTECOVSWITCH=null;
this.AUTOMAPCOVSWITCH=null;
this.DBLAYERQUERY=null;
this.LINEPRIMITIVE=null;
this.POLYGONPRIMITIVE=null;
this.RECTANGLEPRIMITIVE=null;
this.ELLIPSEPRIMITIVE=null;
this.TEXTPRIMITIVE=null;
this.SYMBOLPRIMITIVE=null;
this.LATLNG=null;
this.POINT=null;
this.POINTFEATURE=null;
this.LINEFEATURE=null;
this.POLYGONFEATURE=null;
this.LOCATION=null;
this.ADDRESS=null;
this.SINGLELINEADDRESS=null;
this.GEOADDRESS=null;
this.GEOCODEOPTIONS=null;
this.MANEUVER=null;
this.ROUTEOPTIONS=null;
this.ROUTERESULTS=null;
this.ROUTEMATRIXRESULTS=null;
this.RADIUSSEARCHCRITERIA=null;
this.RECTSEARCHCRITERIA=null;
this.POLYSEARCHCRITERIA=null;
this.CORRIDORSEARCHCRITERIA=null;
this.SIGN=null;
this.TREKROUTE=null;
this.INTCOLLECTION=null;
this.DTCOLLECTION=null;
this.LATLNGCOLLECTION=null;
this.LOCATIONCOLLECTION=null;
this.LOCATIONCOLLECTIONCOLLECTION=null;
this.MANEUVERCOLLECTION=null;
this.SIGNCOLLECTION=null;
this.STRINGCOLLECTION=null;
this.STRCOLCOLLECTION=null;
this.FEATURECOLLECTION=null;
this.PRIMITIVECOLLECTION=null;
this.POINTCOLLECTION=null;
this.TREKROUTECOLLECTION=null;
this.FEATURESPECIFIERCOLLECTION=null;
this.GEOCODEOPTIONSCOLLECTION=null;
this.COVERAGESTYLE=null;
this.RECORDSET=null;
this.MAPSTATE=null;
this.SESSION=null;
this.SESSIONID=null;
this.DTSTYLE=null;
this.DTSTYLEEX=null;
this.DTFEATURESTYLEEX=null;
this.FEATURESPECIFIER=null;
this.BESTFIT=null;
this.BESTFITLL=null;
this.CENTER=null;
this.CENTERLATLNG=null;
this.PAN=null;
this.ZOOMIN=null;
this.ZOOMOUT=null;
this.ZOOMTO=null;
this.ZOOMTORECT=null;
this.ZOOMTORECTLATLNG=null;
this.getAUTOGEOCODECOVSWITCH=function(){
if(this.AUTOGEOCODECOVSWITCH===null){
this.AUTOGEOCODECOVSWITCH=MQA.createXMLDoc("<AutoGeocodeCovSwitch/>");
}
return this.AUTOGEOCODECOVSWITCH;
};
this.getAUTOROUTECOVSWITCH=function(){
if(this.AUTOROUTECOVSWITCH===null){
this.AUTOROUTECOVSWITCH=MQA.createXMLDoc("<AutoRouteCovSwitch><Name/><DataVendorCodeUsage>0</DataVendorCodeUsage><DataVendorCodes Count=\"0\"/></AutoRouteCovSwitch>");
}
return this.AUTOROUTECOVSWITCH;
};
this.getAUTOMAPCOVSWITCH=function(){
if(this.AUTOMAPCOVSWITCH===null){
this.AUTOMAPCOVSWITCH=MQA.createXMLDoc("<AutoMapCovSwitch><Name/><Style/><DataVendorCodeUsage>0</DataVendorCodeUsage><DataVendorCodes Count=\"0\"/><ZoomLevels Count=\"14\"><Item>6000</Item><Item>12000</Item><Item>24000</Item><Item>48000</Item><Item>96000</Item><Item>192000</Item><Item>400000</Item><Item>800000</Item><Item>1600000</Item><Item>3000000</Item><Item>6000000</Item><Item>12000000</Item><Item>24000000</Item><Item>48000000</Item></ZoomLevels></AutoMapCovSwitch>");
}
return this.AUTOMAPCOVSWITCH;
};
this.getDBLAYERQUERY=function(){
if(this.DBLAYERQUERY===null){
this.DBLAYERQUERY=MQA.createXMLDoc("<DBLayerQuery/>");
}
return this.DBLAYERQUERY;
};
this.getLINEPRIMITIVE=function(){
if(this.LINEPRIMITIVE===null){
this.LINEPRIMITIVE=MQA.createXMLDoc("<LinePrimitive Version=\"2\"/>");
}
return this.LINEPRIMITIVE;
};
this.getPOLYGONPRIMITIVE=function(){
if(this.POLYGONPRIMITIVE===null){
this.POLYGONPRIMITIVE=MQA.createXMLDoc("<PolygonPrimitive Version=\"2\"/>");
}
return this.POLYGONPRIMITIVE;
};
this.getRECTANGLEPRIMITIVE=function(){
if(this.RECTANGLEPRIMITIVE===null){
this.RECTANGLEPRIMITIVE=MQA.createXMLDoc("<RectanglePrimitive Version=\"2\"/>");
}
return this.RECTANGLEPRIMITIVE;
};
this.getELLIPSEPRIMITIVE=function(){
if(this.ELLIPSEPRIMITIVE===null){
this.ELLIPSEPRIMITIVE=MQA.createXMLDoc("<EllipsePrimitive Version=\"2\"/>");
}
return this.ELLIPSEPRIMITIVE;
};
this.getTEXTPRIMITIVE=function(){
if(this.TEXTPRIMITIVE===null){
this.TEXTPRIMITIVE=MQA.createXMLDoc("<TextPrimitive Version=\"2\"/>");
}
return this.TEXTPRIMITIVE;
};
this.getSYMBOLPRIMITIVE=function(){
if(this.SYMBOLPRIMITIVE===null){
this.SYMBOLPRIMITIVE=MQA.createXMLDoc("<SymbolPrimitive Version=\"2\"/>");
}
return this.SYMBOLPRIMITIVE;
};
this.getLATLNG=function(){
if(this.LATLNG===null){
this.LATLNG=MQA.createXMLDoc("<LatLng/>");
}
return this.LATLNG;
};
this.getPOINT=function(){
if(this.POINT===null){
this.POINT=MQA.createXMLDoc("<Point/>");
}
return this.POINT;
};
this.getPOINTFEATURE=function(){
if(this.POINTFEATURE===null){
this.POINTFEATURE=MQA.createXMLDoc("<PointFeature/>");
}
return this.POINTFEATURE;
};
this.getLINEFEATURE=function(){
if(this.LINEFEATURE===null){
this.LINEFEATURE=MQA.createXMLDoc("<LineFeature/>");
}
return this.LINEFEATURE;
};
this.getPOLYGONFEATURE=function(){
if(this.POLYGONFEATURE===null){
this.POLYGONFEATURE=MQA.createXMLDoc("<PolygonFeature/>");
}
return this.POLYGONFEATURE;
};
this.getLOCATION=function(){
if(this.LOCATION===null){
this.LOCATION=MQA.createXMLDoc("<Location/>");
}
return this.LOCATION;
};
this.getADDRESS=function(){
if(this.ADDRESS===null){
this.ADDRESS=MQA.createXMLDoc("<Address/>");
}
return this.ADDRESS;
};
this.getSINGLELINEADDRESS=function(){
if(this.SINGLELINEADDRESS===null){
this.SINGLELINEADDRESS=MQA.createXMLDoc("<SingleLineAddress/>");
}
return this.SINGLELINEADDRESS;
};
this.getGEOADDRESS=function(){
if(this.GEOADDRESS===null){
this.GEOADDRESS=MQA.createXMLDoc("<GeoAddress/>");
}
return this.GEOADDRESS;
};
this.getGEOCODEOPTIONS=function(){
if(this.GEOCODEOPTIONS===null){
this.GEOCODEOPTIONS=MQA.createXMLDoc("<GeocodeOptions/>");
}
return this.GEOCODEOPTIONS;
};
this.getMANEUVER=function(){
if(this.MANEUVER===null){
this.MANEUVER=MQA.createXMLDoc("<Maneuver Version=\"1\"><Narrative/><Streets Count=\"0\"/><TurnType>-1</TurnType><Distance>0.0</Distance><Time>-1</Time><Direction>0</Direction><ShapePoints Count=\"0\"/><GEFIDs Count=\"0\"/><Signs  Count=\"0\"/></Maneuver>");
}
return this.MANEUVER;
};
this.getROUTEOPTIONS=function(){
if(this.ROUTEOPTIONS===null){
this.ROUTEOPTIONS=MQA.createXMLDoc("<RouteOptions Version=\"3\"><RouteType>0</RouteType><NarrativeType>1</NarrativeType><NarrativeDistanceUnitType>0</NarrativeDistanceUnitType><MaxShape>0</MaxShape><MaxGEFID>0</MaxGEFID><Language>English</Language><CoverageName></CoverageName><CovSwitcher><Name></Name><DataVendorCodeUsage>0</DataVendorCodeUsage><DataVendorCodes Count=\"0\"/></CovSwitcher><AvoidAttributeList Count=\"0\"/><AvoidGefIdList Count=\"0\"/><AvoidAbsoluteGefIdList Count=\"0\"/><StateBoundaryDisplay>1</StateBoundaryDisplay><CountryBoundaryDisplay>1</CountryBoundaryDisplay></RouteOptions>");
}
return this.ROUTEOPTIONS;
};
this.getROUTERESULTS=function(){
if(this.ROUTERESULTS===null){
this.ROUTERESULTS=MQA.createXMLDoc("<RouteResults Version=\"1\"><Locations Count=\"0\"/><CoverageName/><ResultMessages Count=\"0\"/><TrekRoutes Count=\"0\"/></RouteResults>");
}
return this.ROUTERESULTS;
};
this.getROUTEMATRIXRESULTS=function(){
if(this.ROUTEMATRIXRESULTS===null){
this.ROUTEMATRIXRESULTS=MQA.createXMLDoc("<RouteMatrixResults/>");
}
return this.ROUTEMATRIXRESULTS;
};
this.getRADIUSSEARCHCRITERIA=function(){
if(this.RADIUSSEARCHCRITERIA===null){
this.RADIUSSEARCHCRITERIA=MQA.createXMLDoc("<RadiusSearchCriteria/>");
}
return this.RADIUSSEARCHCRITERIA;
};
this.getRECTSEARCHCRITERIA=function(){
if(this.RECTSEARCHCRITERIA===null){
this.RECTSEARCHCRITERIA=MQA.createXMLDoc("<RectSearchCriteria/>");
}
return this.RECTSEARCHCRITERIA;
};
this.getPOLYSEARCHCRITERIA=function(){
if(this.POLYSEARCHCRITERIA===null){
this.POLYSEARCHCRITERIA=MQA.createXMLDoc("<PolySearchCriteria/>");
}
return this.POLYSEARCHCRITERIA;
};
this.getCORRIDORSEARCHCRITERIA=function(){
if(this.CORRIDORSEARCHCRITERIA===null){
this.CORRIDORSEARCHCRITERIA=MQA.createXMLDoc("<CorridorSearchCriteria/>");
}
return this.CORRIDORSEARCHCRITERIA;
};
this.getSIGN=function(){
if(this.SIGN===null){
this.SIGN=MQA.createXMLDoc("<Sign><Type>0</Type><Text></Text><ExtraText></ExtraText><Direction>0</Direction></Sign>");
}
return this.SIGN;
};
this.getTREKROUTE=function(){
if(this.TREKROUTE===null){
this.TREKROUTE=MQA.createXMLDoc("<TrekRoute><Maneuvers Count=\"0\"/></TrekRoute>");
}
return this.TREKROUTE;
};
this.getINTCOLLECTION=function(){
if(this.INTCOLLECTION===null){
this.INTCOLLECTION=MQA.createXMLDoc("<IntCollection Count=\"0\"/>");
}
return this.INTCOLLECTION;
};
this.getDTCOLLECTION=function(){
if(this.DTCOLLECTION===null){
this.DTCOLLECTION=MQA.createXMLDoc("<DTCollection Version=\"1\" Count=\"0\"/>");
}
return this.DTCOLLECTION;
};
this.getLATLNGCOLLECTION=function(){
if(this.LATLNGCOLLECTION===null){
this.LATLNGCOLLECTION=MQA.createXMLDoc("<LatLngCollection Version=\"1\" Count=\"0\"/>");
}
return this.LATLNGCOLLECTION;
};
this.getLOCATIONCOLLECTION=function(){
if(this.LOCATIONCOLLECTION===null){
this.LOCATIONCOLLECTION=MQA.createXMLDoc("<LocationCollection Count=\"0\"/>");
}
return this.LOCATIONCOLLECTION;
};
this.getLOCATIONCOLLECTIONCOLLECTION=function(){
if(this.LOCATIONCOLLECTIONCOLLECTION===null){
this.LOCATIONCOLLECTIONCOLLECTION=MQA.createXMLDoc("<LocationCollectionCollection Count=\"0\"/>");
}
return this.LOCATIONCOLLECTIONCOLLECTION;
};
this.getMANEUVERCOLLECTION=function(){
if(this.MANEUVERCOLLECTION===null){
this.MANEUVERCOLLECTION=MQA.createXMLDoc("<ManeuverCollection Count=\"0\"/>");
}
return this.MANEUVERCOLLECTION;
};
this.getSIGNCOLLECTION=function(){
if(this.SIGNCOLLECTION===null){
this.SIGNCOLLECTION=MQA.createXMLDoc("<SignCollection Count=\"0\"/>");
}
return this.SIGNCOLLECTION;
};
this.getSTRINGCOLLECTION=function(){
if(this.STRINGCOLLECTION===null){
this.STRINGCOLLECTION=MQA.createXMLDoc("<StringCollection Count=\"0\"/>");
}
return this.STRINGCOLLECTION;
};
this.getSTRCOLCOLLECTION=function(){
if(this.STRCOLCOLLECTION===null){
this.STRCOLCOLLECTION=MQA.createXMLDoc("<StrColCollectin/>");
}
return this.STRCOLCOLLECTION;
};
this.getFEATURECOLLECTION=function(){
if(this.FEATURECOLLECTION===null){
this.FEATURECOLLECTION=MQA.createXMLDoc("<FeatureCollection Count=\"0\"/>");
}
return this.FEATURECOLLECTION;
};
this.getPRIMITIVECOLLECTION=function(){
if(this.PRIMITIVECOLLECTION===null){
this.PRIMITIVECOLLECTION=MQA.createXMLDoc("<PrimitiveCollection Count=\"0\"/>");
}
return this.PRIMITIVECOLLECTION;
};
this.getPOINTCOLLECTION=function(){
if(this.POINTCOLLECTION===null){
this.POINTCOLLECTION=MQA.createXMLDoc("<PointCollection Count=\"0\"/>");
}
return this.POINTCOLLECTION;
};
this.getTREKROUTECOLLECTION=function(){
if(this.TREKROUTECOLLECTION===null){
this.TREKROUTECOLLECTION=MQA.createXMLDoc("<TrekRouteCollection Count=\"0\"/>");
}
return this.TREKROUTECOLLECTION;
};
this.getFEATURESPECIFIERCOLLECTION=function(){
if(this.FEATURESPECIFIERCOLLECTION===null){
this.FEATURESPECIFIERCOLLECTION=MQA.createXMLDoc("<FeatureSpecifierCollection Count=\"0\"/>");
}
return this.FEATURESPECIFIERCOLLECTION;
};
this.getGEOCODEOPTIONSCOLLECTION=function(){
if(this.GEOCODEOPTIONSCOLLECTION===null){
this.GEOCODEOPTIONSCOLLECTION=MQA.createXMLDoc("<GeocodeOptionsCollection Count=\"0\"/>");
}
return this.GEOCODEOPTIONSCOLLECTION;
};
this.getCOVERAGESTYLE=function(){
if(this.COVERAGESTYLE===null){
this.COVERAGESTYLE=MQA.createXMLDoc("<CoverageStyle/>");
}
return this.COVERAGESTYLE;
};
this.getRECORDSET=function(){
if(this.RECORDSET===null){
this.RECORDSET=MQA.createXMLDoc("<RecordSet/>");
}
return this.RECORDSET;
};
this.getMAPSTATE=function(){
if(this.MAPSTATE===null){
this.MAPSTATE=MQA.createXMLDoc("<MapState/>");
}
return this.MAPSTATE;
};
this.getSESSION=function(){
if(this.SESSION===null){
this.SESSION=MQA.createXMLDoc("<Session Count=\"0\"/>");
}
return this.SESSION;
};
this.getSESSIONID=function(){
if(this.SESSIONID===null){
this.SESSIONID=MQA.createXMLDoc("<SessionID/>");
}
return this.SESSIONID;
};
this.getDTSTYLE=function(){
if(this.DTSTYLE===null){
this.DTSTYLE=MQA.createXMLDoc("<DTStyle/>");
}
return this.DTSTYLE;
};
this.getDTSTYLEEX=function(){
if(this.DTSTYLEEX===null){
this.DTSTYLEEX=MQA.createXMLDoc("<DTStyleEx/>");
}
return this.DTSTYLEEX;
};
this.getDTFEATURESTYLEEX=function(){
if(this.DTFEATURESTYLEEX===null){
this.DTFEATURESTYLEEX=MQA.createXMLDoc("<DTFeatureStyleEx/>");
}
return this.DTFEATURESTYLEEX;
};
this.getFEATURESPECIFIER=function(){
if(this.FEATURESPECIFIER===null){
this.FEATURESPECIFIER=MQA.createXMLDoc("<FeatureSpecifier/>");
}
return this.FEATURESPECIFIER;
};
this.getBESTFIT=function(){
if(this.BESTFIT===null){
this.BESTFIT=MQA.createXMLDoc("<BestFit Version=\"2\"/>");
}
return this.BESTFIT;
};
this.getBESTFITLL=function(){
if(this.BESTFITLL===null){
this.BESTFITLL=MQA.createXMLDoc("<BestFitLL Version=\"2\"/>");
}
return this.BESTFITLL;
};
this.getCENTER=function(){
if(this.CENTER===null){
this.CENTER=MQA.createXMLDoc("<Center/>");
}
return this.CENTER;
};
this.getCENTERLATLNG=function(){
if(this.CENTERLATLNG===null){
this.CENTERLATLNG=MQA.createXMLDoc("<CenterLatLng/>");
}
return this.CENTERLATLNG;
};
this.getPAN=function(){
if(this.PAN===null){
this.PAN=MQA.createXMLDoc("<Pan/>");
}
return this.PAN;
};
this.getZOOMIN=function(){
if(this.ZOOMIN===null){
this.ZOOMIN=MQA.createXMLDoc("<ZoomIn/>");
}
return this.ZOOMIN;
};
this.getZOOMOUT=function(){
if(this.ZOOMOUT===null){
this.ZOOMOUT=MQA.createXMLDoc("<ZoomOut/>");
}
return this.ZOOMOUT;
};
this.getZOOMTO=function(){
if(this.ZOOMTO===null){
this.ZOOMTO=MQA.createXMLDoc("<ZoomTo/>");
}
return this.ZOOMTO;
};
this.getZOOMTORECT=function(){
if(this.ZOOMTORECT===null){
this.ZOOMTORECT=MQA.createXMLDoc("<ZoomToRect/>");
}
return this.ZOOMTORECT;
};
this.getZOOMTORECTLATLNG=function(){
if(this.ZOOMTORECTLATLNG===null){
this.ZOOMTORECTLATLNG=MQA.createXMLDoc("<ZoomToRectLatLng/>");
}
return this.ZOOMTORECTLATLNG;
};
};
MQXMLDOC=MQA.XMLDOC;
MQA.MQXML=new MQA.XMLDOC();
MQXML=MQA.MQXML;
MQA.ObjectCollection=function(max){
MQA.Object.call(this);
var _41=new Array();
this.getM_Items=function(){
return _41;
};
var _42=(max!==null)?max:-1;
var _43="MQObject";
this.getValidClassName=function(){
return _43;
};
this.setValidClassName=function(_44){
_43=_44;
};
this.add=function(obj){
if(this.isValidObject(obj)){
if(_42!==-1&&_41.length===max){
return;
}
_41.push(obj);
return _41.length;
}
return;
};
this.getSize=function(){
return _41.length;
};
this.get=function(i){
return _41[i];
};
this.remove=function(_47){
return _41.splice(_47,1);
};
this.removeAll=function(){
_41=null;
_41=new Array();
};
this.contains=function(_48){
var _49=this.getSize();
for(var _4a=0;_4a<_49;_4a++){
if(_41[_4a]===_48){
return true;
}
}
return false;
};
this.append=function(_4b){
if(this.getClassName()===_4b.getClassName()){
_41=_41.concat(_4b.getM_Items());
}else{
alert("Invalid attempt to append "+this.getClassName()+" to "+_4b.getClassName()+"!");
throw "Invalid attempt to append "+this.getClassName()+" to "+_4b.getClassName()+"!";
}
};
this.set=function(i,_4d){
var _4e=get(i);
_41[i]=_4d;
return _4e;
};
this.isValidObject=function(obj){
if(obj!==null){
if(_43==="ALL"){
return true;
}else{
if(_43==="MQObject"){
return true;
}else{
if(_43==="String"){
return true;
}else{
if(_43==="int"){
if(isNaN(obj)){
return false;
}else{
if(obj===Math.floor(obj)){
return true;
}
}
}else{
if(obj.getClassName()===_43){
return true;
}
}
}
}
}
}
return false;
};
var _50="Item";
this.getM_itemXpath=function(){
return _50;
};
this.setM_itemXpath=function(_51){
_50=_51;
};
this.getById=function(_52){
try{
for(var _53=0;_53<this.getSize();_53++){
if(_41[_53].getId()==_52){
return _41[_53];
}
}
}
catch(Error){
}
return null;
};
this.removeItem=function(_54){
for(var i=0;i<_41.length;i++){
if(_41[i]==_54){
this.remove(i);
i=_41.length;
}
}
};
};
MQA.ObjectCollection.prototype=new MQA.Object();
MQA.ObjectCollection.prototype.constructor=MQA.ObjectCollection;
MQA.ObjectCollection.prototype.getClassName=function(){
return "MQObjectCollection";
};
MQA.ObjectCollection.prototype.getObjectVersion=function(){
return 0;
};
MQA.ObjectCollection.prototype.getAt=function(i){
return this.get(i);
};
MQObjectCollection=MQA.ObjectCollection;
MQA.LatLngCollection=function(){
MQA.ObjectCollection.call(this,32678);
this.setValidClassName("MQLatLng");
this.setM_Xpath("LatLngCollection");
this.setM_XmlDoc(MQA.createXMLDocFromNode(MQA.MQXML.getLATLNGCOLLECTION()));
};
MQA.LatLngCollection.prototype=new MQA.ObjectCollection(32678);
MQA.LatLngCollection.prototype.constructor=MQA.LatLngCollection;
MQA.LatLngCollection.prototype.getClassName=function(){
return "MQLatLngCollection";
};
MQA.LatLngCollection.prototype.getObjectVersion=function(){
return 1;
};
MQA.LatLngCollection.prototype.loadXml=function(_57){
this.removeAll();
var _58=MQA.createXMLDoc(_57);
this.setM_XmlDoc(_58);
if(_58!==null){
this._loadCollection(_58);
}
};
MQA.LatLngCollection.prototype.loadXmlFromNode=function(_59){
this.removeAll();
var _5a=mqCreateXMLDocImportNode(_59);
this.setM_XmlDoc(_5a);
if(_5a!==null){
this._loadCollection(_5a);
}
};
MQA.LatLngCollection.prototype._loadCollection=function(_5b){
var _5c=_5b.documentElement;
var _5d=_5c.childNodes;
var _5e=_5d.length;
_5e=(_5e<32678)?_5e:32678;
var _5f=0;
var _60=0;
var _61=0;
var _62=0;
var _63=null;
if(this.getValidClassName()==="MQLatLng"){
for(var _64=0;_64<_5e;_64++){
if(_64==0){
if(_5d[_64].firstChild!==null){
_61=_5d[_64].firstChild.nodeValue/1000000;
}
_64++;
if(_5d[_64].firstChild!==null){
_62=_5d[_64].firstChild.nodeValue/1000000;
}
}else{
if(_5d[_64].firstChild!==null){
_61=_5f+(_5d[_64].firstChild.nodeValue/1000000);
}
_64++;
if(_5d[_64].firstChild!==null){
_62=_60+(_5d[_64].firstChild.nodeValue/1000000);
}
}
_5f=_61;
_60=_62;
_63=new MQA.LatLng(_61,_62);
this.add(_63);
}
}
};
MQA.LatLngCollection.prototype.saveXml=function(){
var _65="<"+this.getM_Xpath()+" Version=\""+this.getObjectVersion()+"\" Count=\""+this.getSize()+"\">";
var _66=parseInt(this.getSize());
if(_66>=1){
var _67=nLng=nPrevLat=nPrevLng=nDeltaLat=nDeltaLng=0;
var _68=null;
for(var i=0;i<_66;i++){
_68=this.getAt(i);
_67=parseInt(_68.getLatitude()*1000000);
nLng=parseInt(_68.getLongitude()*1000000);
nDeltaLat=_67-nPrevLat;
nDeltaLng=nLng-nPrevLng;
_65+="<Lat>"+nDeltaLat+"</Lat>";
_65+="<Lng>"+nDeltaLng+"</Lng>";
nPrevLat=_67;
nPrevLng=nLng;
}
}
_65=_65+"</"+this.getM_Xpath()+">";
return _65;
};
MQA.LatLngCollection.prototype.generalize=function(_6a){
var _6b=function(){
this.pLL=null;
this.dSegmentLength=0;
this.dPriorLength=0;
};
var _6c=function(){
this.pLL=null;
this.ulOriginalPoint=0;
};
mqllAnchor=null;
var _6d;
var i;
var _6f=0;
var _70=this.getSize();
var _71=new Array(_70);
var _72=new Array(_70);
var _73=0;
if(_70<2){
return;
}
for(i=0;i<_70;i++){
_71[i]=new _6b();
_72[i]=new _6c();
_71[i].pLL=this.getAt(i);
}
for(i=0;i<_70-1;i++){
_71[i].dSegmentLength=_71[i].pLL.arcDistance(_71[(i+1)].pLL);
if(i==0){
_71[i].dPriorLength=0;
}else{
_71[i].dPriorLength=_6f;
}
_6f+=_71[i].dSegmentLength;
}
mqllAnchor=_71[0].pLL;
_6d=0;
_72[0].pLL=mqllAnchor;
_72[0].ulOriginalPoint=0;
_73=1;
for(i=2;i<_70;i++){
if(!this.isEverybodyWithinDeviation(_71,_6d,i,_6a)){
mqllAnchor=_71[(i-1)].pLL;
_6d=(i-1);
_72[_73].pLL=mqllAnchor;
_72[_73].ulOriginalPoint=(i-1);
_73++;
}
}
_72[_73].pLL=_71[_70-1].pLL;
_72[_73].ulOriginalPoint=_70-1;
_73++;
var _74=_70;
var _75;
for(_75=(_73-1);_75>=0;_75--){
if((_74-1)!=_72[_75].ulOriginalPoint){
for(var x=(_74-1);x>_72[_75].ulOriginalPoint;x--){
try{
this.remove(x);
}
catch(e){
}
}
_74=_72[_75].ulOriginalPoint;
}else{
_74--;
}
}
_71=null;
_72=null;
};
MQA.LatLngCollection.prototype.isEverybodyWithinDeviation=function(_77,_78,_79,_7a){
var _7b=0;
var _7c=0;
var _7d=null;
var _7e=null;
var _7f=0;
var _80=0;
var _81=0;
var i;
var _83=null;
var _84=0;
var _85=0;
var _86=0;
var _87=0;
var _88=0;
var _89=0;
var _8a=0;
var _8b=0;
_7b=MQA.DistanceApproximation.getMilesPerLngDeg(_77[_78].pLL.getLatitude());
_7c=_7a*_7a;
_7d=_77[_78].pLL;
_7e=_77[_79].pLL;
_7f=(_7e.getLatitude()-_7d.getLatitude())*MQA.DistanceApproximation.MILES_PER_LATITUDE;
_80=(_7e.getLongitude()-_7d.getLongitude())*_7b;
_81=_7f*_7f+_80*_80;
for(i=_78+1;i<_79;i++){
_83=_77[i].pLL;
_84=(_83.getLatitude()-_7d.getLatitude())*MQA.DistanceApproximation.MILES_PER_LATITUDE;
_85=(_83.getLongitude()-_7d.getLongitude())*_7b;
_86=_84*_84+_85*_85;
_88=_7f*_84+_80*_85;
_89=_7f*_7f+_80*_80;
if(_89==0){
_87=0;
}else{
_87=_88/_89;
}
_8a=_87*_87*_81;
_8b=_86-_8a;
if(_8b>_7c){
return false;
}
}
return true;
};
MQLatLngCollection=MQA.LatLngCollection;
MQA.DistanceApproximation=new function(){
this.m_testLat;
this.m_testLng;
this.m_mpd;
this.m_milesPerLngDeg=new Array(69.170976,69.160441,69.128838,69.076177,69.002475,68.907753,68.792041,68.655373,68.497792,68.319345,68.120088,67.900079,67.659387,67.398085,67.116253,66.813976,66.491346,66.148462,65.785428,65.402355,64.999359,64.576564,64.134098,63.672096,63.190698,62.690052,62.17031,61.63163,61.074176,60.498118,59.903632,59.290899,58.660106,58.011443,57.345111,56.66131,55.96025,55.242144,54.507211,53.755675,52.987764,52.203713,51.403761,50.588151,49.757131,48.910956,48.049882,47.174172,46.284093,45.379915,44.461915,43.530372,42.58557,41.627796,40.657342,39.674504,38.679582,37.672877,36.654698,35.625354,34.585159,33.534429,32.473485,31.40265,30.322249,29.232613,28.134073,27.026963,25.911621,24.788387,23.657602,22.519612,21.374762,20.223401,19.065881,17.902554,16.733774,15.559897,14.38128,13.198283,12.011266,10.820591,9.626619,8.429716,7.230245,6.028572,4.825062,3.620083,2.414002,1.207185,1);
this.MILES_PER_LATITUDE=69.170976;
this.KILOMETERS_PER_MILE=1.609347;
this.getMilesPerLngDeg=function(lat){
return (Math.abs(lat)<=90)?this.m_milesPerLngDeg[parseInt(Math.abs(lat)+0.5)]:69.170976;
};
};
DistanceApproximation=MQA.DistanceApproximation;

if(typeof (MQA)=="undefined"){
MQA=new Object();
}
MQA.Util={getLLToXY:function(LL){
var xy=new MQA.PointXY(0,0);
var _3=MQA.getColTile(LL.lng,this.scale);
var _4=MQA.getRowTile(LL.lat,this.scale);
var _5=MQA.getColTileOffset(LL.lng,this.scale);
var _6=this.tilesize-MQA.getRowTileOffset(LL.lat,this.scale);
xy.x=parseInt(this.width/2)-((this.m_centerX+this.m_shiftX-_3)*this.tilesize)-(this.m_offsetX-this.m_dragoffX-_5);
xy.y=parseInt(this.height/2)+((this.m_centerY-this.m_shiftY-_4)*this.tilesize)-(this.m_offsetY-this.m_dragoffY-_6);
xy.x=parseInt(xy.x);
xy.y=parseInt(xy.y);
return xy;
},isIntersectedXY:function(_7,_8){
var _9=(_7.lr.x>_8.ul.x)&&(_7.ul.x<_8.lr.x)&&(_7.lr.y>_8.ul.y)&&(_7.ul.y<_8.lr.y);
return _9;
},isIntersectedLL:function(_a,_b){
var _c=(_a.lr.lat<_b.ul.lat)&&(_a.ul.lat>_b.lr.lat)&&(_a.lr.lng>_b.ul.lng)&&(_a.ul.lng<_b.lr.lng);
return _c;
},isMouseLeaveOrEnter:function(e,_e){
if(e.type!="mouseout"&&e.type!="mouseover"){
return false;
}
var _f=e.relatedTarget?e.relatedTarget:e.type=="mouseout"?e.toElement:e.fromElement;
while(_f&&_f!=_e){
_f=_f.parentNode;
}
return (_f!=_e);
},getTop:function(_10){
var top=0;
while(_10){
top+=parseInt(_10.offsetTop);
_10=_10.offsetParent;
}
return (top);
},centreElement:function(_12){
_12.style.left=(MQA.browser.size().width-_12.offsetWidth)/2+"px";
_12.style.top=(MQA.browser.size().height-_12.offsetHeight)/2+"px";
},deleteChildElements:function(obj){
if(obj&&obj.childNodes.length>0){
for(var i=(obj.childNodes.length-1);i>=0;i--){
obj.removeChild(obj.childNodes[i]);
}
}
},deleteElement:function(obj){
if(obj){
obj.parentNode.removeChild(obj);
}
},pngFilter:function(_16){
if(!document.getElementsByTagName){
return;
}
if(MQA.browser.info.name=="msie"&&((MQA.browser.info.version<7)&&MQA.browser.info.version>5)){
var _17=(_16)?_16:document.images;
for(var i=0,l=_17.length;i<l;i++){
var img=_17[i];
var _1b=img.src;
if(_1b){
var _1c=_1b.length;
if(_1b.toLowerCase().substring(_1c-4,_1c)==".png"){
if(!img.title){
img.title=(img.alt)?img.alt:"";
}
img.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"');";
img.src=MQ.art.spacer;
}
}
}
}
},getSuperRect:function(_1d,_1e){
var _1f=new MQA.RectLL(new MQA.PointLL(0,0),new MQA.PointLL(0,0));
_1f.ul.lat=Math.max(_1d.ul.lat,_1e.ul.lat);
_1f.ul.lng=Math.min(_1d.ul.lng,_1e.ul.lng);
_1f.lr.lat=Math.min(_1d.lr.lat,_1e.lr.lat);
_1f.lr.lng=Math.max(_1d.lr.lng,_1e.lr.lng);
return _1f;
},_hasPngExtention:function(url){
var _21=url.toLowerCase();
var _22=_21.lastIndexOf(".png");
if((_22!=-1)&&(_22==(_21.length-4))){
return true;
}
return false;
},_createImage:function(url,_24,top,_26,_27,_28){
var img;
img=document.createElement("img");
if(_28==null){
_28=false;
}
if(_28){
img.isPng=_28;
}else{
img.isPng=this._hasPngExtention(url);
}
if(!img.isPng){
img.src=url;
}else{
if(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5)){
img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"', sizingMethod='image')";
img.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
}else{
img.src=url;
}
}
img.style.left=_24+"px";
img.style.top=top+"px";
img.style.width=_26+"px";
img.style.height=_27+"px";
img.style.position="absolute";
img.style.zIndex=200;
img.style.MozUserSelect="none";
img.style.border="none";
img.style.display="block";
img.unselectable="on";
img.onselectstart=MQA._prEvent.falseFunction;
img.oncontextmenu=MQA._prEvent.falseFunction;
if(_28==null){
_28=false;
}
if(_28){
img.isPng=_28;
}else{
img.isPng=this._hasPngExtention(url);
}
return img;
},createImage:function(URL,_2b,TOP,_2d,_2e,_2f){
var _30;
_30=document.createElement("IMG");
_30.galleryimg="no";
_30.lt=_2b;
_30.tp=TOP;
var _31=_30.style;
_31.width=MQA.Util.asPix(_2d);
_31.height=MQA.Util.asPix(_2e);
_31.position="absolute";
_31.left=MQA.Util.asPix(_2b);
_31.top=MQA.Util.asPix(TOP);
_31.zIndex=_2f;
_31.MozUserSelect="none";
_31.display="block";
_31.border="0";
if(URL.length==0){
_31.visibility="hidden";
}else{
_31.visibility="visible";
_30.src=URL;
}
_30.unselectable="on";
_30.onselectstart=MQA._prEvent.falseFunction;
_30.oncontextmenu=MQA._prEvent.falseFunction;
return _30;
},pause:function(_32){
var now=new Date();
var _34=now.getTime()+_32;
while(true){
now=new Date();
if(now.getTime()>_34){
return;
}
}
},asPix:function(X){
return X+"px";
},calcPercentage:function(_36,_37){
return Math.round((_36/_37)*100);
},stripHTMLTags:function(s){
return s.replace(/<\/?[^>]+>/gi,"");
},panAngle:function(_39,_3a,_3b,_3c){
var b=(_3c-_3a);
var c=(_3b-_39);
if(b<0){
b=b*-1;
}
if(c<0){
c=c*-1;
}
var a=Math.round(Math.sqrt(b*b+c*c));
var _40=Math.round((Math.asin(b/a)*360)/(2*3.14));
return _40;
},isOverLimit:function(_41){
var _42=false;
var _43=16000;
for(var i=0;i<_41.length;i++){
if(_41[i].x>_43||_41[i].x<-_43||_41[i].y>_43||_41[i].y<-_43){
_42=true;
break;
}
}
return _42;
},InitDojo:function(_45){
window.onload=_45;
},getWindowScrollXY:function(){
var _46=new MQA.Point(0,0);
if(typeof (window.pageYOffset)=="number"){
_46.setX(window.pageXOffset);
_46.setY(window.pageYOffset);
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_46.setX(document.body.scrollLeft);
_46.setY(document.body.scrollTop);
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_46.setX(document.documentElement.scrollLeft);
_46.setY(document.documentElement.scrollTop);
}
}
}
return (_46);
},getHTMLSubstring:function(_47,_48,_49){
var _4a=/<\/?[^>]+>/ig;
var _4b=new Array();
var _4c=_47.replace(_4a,"|");
var _4d=_4c.split("|");
_4b=_47.match(_4a);
var _4e="";
var _4f=false;
for(var i=charCount=0;i<_4d.length;i++){
charCount+=_4d[i].length;
if(charCount>=_48&&_4f==false){
charCount-=_4d[i].length;
_4d[i]=_4d[i].substr(0,(_48-charCount))+_49;
_4f=true;
continue;
}
if(_4f==true){
_4d[i]="";
}
}
for(var i=0;i<_4d.length;i++){
_4e+=_4d[i];
if(_4b&&(_4b.length>0)&&(i<_4b.length)){
_4e+=_4b[i];
}
}
return (_4e);
},getBrowserSize:function(){
size=new MQA.Size(0,0);
if(document.body.scrollHeight>document.body.offsetHeight){
size.width=document.body.scrollWidth;
size.height=document.body.scrollHeight;
}else{
size.width=document.body.offsetWidth;
size.height=document.body.offsetHeight;
}
if(document.body.clientWidth){
size.width=document.body.clientWidth;
size.height=document.body.clientHeight;
}else{
size.width=document.body.offsetWidth;
size.height=document.body.offsetHeight;
}
if(document.documentElement.clientWidth){
size.width=document.documentElement.clientWidth;
size.height=document.documentElement.clientHeight;
}
if(self.innerWidth){
size.width=self.innerWidth;
size.height=self.innerHeight;
}
return size;
},isSupportedBrowser:function(){
browser=MQA.browser;
switch(browser.name){
case "msie":
if(browser.version>=6){
return true;
}
return false;
break;
case "firefox":
if(browser.version>1.5){
return true;
}
return false;
break;
case "netscape":
return false;
break;
case "opera":
return false;
break;
case "safari":
if(browser.version>=2){
return true;
}
return false;
break;
}
return true;
},getParentOffset:function(_51){
var _52=0,_53=0;
do{
_52+=_51.offsetTop||0;
_53+=_51.offsetLeft||0;
_51=_51.offsetParent;
}while(_51);
return (new MQA.Point(_53,_52));
},indexOf:function(_54,_55){
for(var i=0,_57=_54.length;i<_57;i++){
if(_54[i]==_55){
return i;
}
}
return -1;
},getBrowserInfo:function(){
browser=new Object();
browser.name=browser.version=browser.os="unknown";
var _58=navigator.userAgent.toLowerCase();
var _59=new Array("firefox","msie","netscape","opera","safari");
var _5a=new Array("linux","mac","windows","x11");
for(var i=0,n=_59.length;i<n;i++){
var _5d=_58.indexOf(_59[i])+1;
if(_5d>0){
browser.name=_59[i];
var _5e=_5d+browser.name.length;
var _5f=((browser.name=="safari")||(_58.charAt(_5e+4)>0&&_58.charAt(_5e+4)<9))?5:3;
browser.version=_58.substring(_5e,_5e+_5f);
}
}
for(var i=0,n=_5a.length;i<n;i++){
var _5d=_58.indexOf(_5a[i])+1;
if(_5d>0){
browser.os=_5a[i];
}
}
return browser;
},createParentDiv:function(id,lt,tp,_63,top,_65,_66,_67,_68){
var _69=document.createElement("div");
_69.id=id;
_69.lt=lt;
_69.tp=tp;
_69.style.position=_63;
_69.style.top=top+"px";
_69.style.left=_65+"px";
if(_66!=null){
_69.style.zIndex=_66;
}
if(_67!=null){
_69.style.width=_67+"px";
}
if(_68!=null){
_69.style.height=_68+"px";
}
return _69;
},createImgHolder:function(src,_6b,_6c,_6d,_6e){
var _6f=document.createElement("img");
if(src!=null){
_6f.src=src;
}
_6f.unselectable=_6b;
_6f.style.MozUserSelect=_6c;
_6f.style.display=_6d;
if(_6e!=null){
_6f.style.zIndex=_6e;
}
return _6f;
},createImgLogo:function(_70,_71,_72,_73,_74,_75,_76,src,_78,_79){
var _7a=document.createElement("img");
_7a.style.MozUserSelect=_70;
_7a.unselectable=_71;
_7a.corner=_72;
_7a.offset=_73;
_7a.style.position=_74;
_7a.style.display=_75;
_7a.style.zIndex=_76;
if(_78!=null){
_7a.width=_78;
}
if(_79!=null){
_7a.height=_79;
}
return _7a;
},createArea:function(_7b,_7c,_7d,_7e,alt){
var tmp=document.createElement("area");
if(_7b!=null){
tmp.shape=_7b;
}
if(_7c!=null){
tmp.coords=_7c;
}
if(_7d!=null){
tmp.href=_7d;
}
if(_7e!=null){
tmp.title=_7e;
}
if(alt!=null){
tmp.alt=alt;
}
return tmp;
},getCurrentDateObject:function(){
var _81;
iDate=new Date();
if((iDate.toString().indexOf("DT",0)!=-1)||(iDate.toString().indexOf("Daylight Time)",0)!=-1)){
_81=60;
}else{
_81=0;
}
var d=new Date();
var _83=new Object;
_83.year=d.getFullYear();
_83.month=d.getMonth();
_83.day=d.getDate();
_83.hours=d.getHours();
_83.minutes=d.getMinutes();
_83.seconds=d.getSeconds();
_83.ampm=((_83.hours>=12)&&(_83.minutes>0)?"pm":"am");
switch(d.getTimezoneOffset()+_81){
case 300:
_83.timeZone=(_81>0?"EDT":"EST");
break;
case 360:
_83.timeZone=(_81>0?"CDT":"CST");
break;
case 420:
_83.timeZone=(_81>0?"MDT":"MST");
break;
case 480:
_83.timeZone=(_81>0?"PDT":"PST");
break;
case 600:
_83.timeZone=(_81>0?"HDT":"HST");
break;
}
return _83;
},_getRandomGUID:function(n){
var p;
var _86="";
var _87="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
for(var i=0;i<n;i++){
p=Math.floor(Math.random()*_87.length);
_86+=_87.substr(p,1);
}
return _86;
},_cloneValue:function(obj){
if(typeof (obj)!=="object"||obj==null){
return obj;
}
var c=obj instanceof Array?[]:{};
for(var i in obj){
var _8c=obj[i];
if(typeof (_8c)=="object"){
if(_8c instanceof Array){
c[i]=[];
for(var j=0;j<_8c.length;j++){
if(typeof (_8c[j])!="object"){
c[i].push(_8c[j]);
}else{
c[i].push(this._cloneValue(_8c[j]));
}
}
}else{
c[i]=this._cloneValue(_8c);
}
}else{
c[i]=_8c;
}
}
if(MQA.browser.name=="msie"){
c.toString=obj.toString;
}
return c;
},_trim:function(s){
return s.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
},_nukeChildren:function(obj){
var c;
while(obj.childNodes&&obj.childNodes.length>0){
c=obj.lastChild;
this._nukeChildren(c);
if(c.innerHTML){
c.innerHTML=null;
}
if(c.outerHTML){
this._setOuterHTMLToEmptyString(c);
}
if(c.parentNode){
c.parentNode.removeChild(c);
}
c=null;
delete c;
}
},_deleteDOMObject:function(obj){
this._setInnerHTMLToEmptyString(obj);
this._setOuterHTMLToEmptyString(obj);
this._nukeChildren(obj);
if(obj.parentNode){
obj.parentNode.removeChild(obj);
}
obj=null;
return null;
},_setInnerHTMLToEmptyString:function(obj){
if(this.getBrowserInfo().name!="msie"&&this.getBrowserInfo().name!="safari"){
obj.innerHTML=null;
}
},_setOuterHTMLToEmptyString:function(obj){
if(this.getBrowserInfo().name!="safari"&&this.getBrowserInfo().name!="msie"){
obj.outerHTML="";
}
},_purge:function(d){
var a=d.attributes,i,l,n;
if(a){
l=a.length;
for(i=0;i<l;i+=1){
n=a[i].name;
if(typeof d[n]==="function"){
d[n]=null;
}
}
}
a=d.childNodes;
if(a){
l=a.length;
for(i=0;i<l;i+=1){
this._purge(d.childNodes[i]);
}
}
},inArray:function(_99,_9a){
for(var i=0;i<_9a.length;i++){
if(_99==_9a[i]){
return true;
}
}
return false;
}};
MQA.browser=MQA.Util.getBrowserInfo();

MQA._prEvent=new function(){
var _1=false,_2=false,_3=[],_4=[],_5=false;
function _checkUnlReg(){
if(!_5&&document.body){
_5=true;
if(document.body.attachEvent){
document.body.attachEvent("onunload",_onUnload);
}else{
document.body.addEventListener("onunload",_onUnload,false);
}
}
}
function _onLoad(){
_1=true;
_checkUnlReg();
for(var i=0;i<_3.length;i++){
_3[i]();
}
}
function _onUnload(){
}
this._onUnload=function(){
if(_2){
return;
}
if(window.detachEvent){
window.detachEvent("onload",_onLoad);
window.detachEvent("onunload",_onUnload);
if(document.body){
document.body.detachEvent("onunload",_onUnload);
}
}
for(var i=0;i<_4.length;i++){
var l=_4[i];
try{
_4[i]();
if(l){
_4[i]();
}
}
catch(e){
}
}
_2=true;
};
this.addOnUnload=function(_9){
_4.push(_9);
};
this.observe=function(_a,_b,_c){
if(typeof _a=="string"){
_a=document.getElementById(_a);
}
if(_b=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_a.attachEvent)){
_b="keydown";
}
this._observe(_a,_b,_c);
};
this.stopObserving=function(_d,_e,_f){
if(typeof _d=="string"){
_d=document.getElementById(_d);
}
if(_e=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_d.attachEvent)){
_e="keydown";
}
this._stopObserving(_d,_e,_f);
};
var dav=navigator.appVersion;
var _11;
if(dav.match(/\bMSIE\b/)&&window.attachEvent){
_11=parseFloat(dav.split("MSIE ")[1].split(";")[0]);
if(_11){
var _12=[];
this._observe=function(_13,_14,_15){
_13.attachEvent("on"+_14,_15);
var _16=_12.length;
_12[_16]=[_13,_14,_15];
_15["__ie6_"+_14]=_16;
};
this._stopObserving=function(_17,_18,_19){
_17.detachEvent("on"+_18,_19);
var _1a=_19["__ie6_"+_18];
if(_1a){
delete _12[_1a];
}
};
this.addOnUnload(this._evUnloadFcn=function(){
for(var k in _12){
var v=_12[k];
if(typeof v=="object"&&v.length==3){
delete _12[k];
try{
v[0].detachEvent("on"+v[1],v[2]);
}
catch(e){
}
}
}
});
}else{
this._observe=function(_1d,_1e,_1f){
_1d.attachEvent("on"+_1e,_1f);
};
this._stopObserving=function(_20,_21,_22){
_20.detachEvent("on"+_21,_22);
};
}
}else{
_11=false;
this._observe=function(_23,_24,_25){
_23.addEventListener(_24,_25,false);
};
this._stopObserving=function(_26,_27,_28){
_26.removeEventListener(_27,_28,false);
};
}
var _29=[];
this.addDtor=function(obj,_2b){
var _2c=_29.length,v;
if(arguments.length>1){
v=[obj,_2b];
}else{
v=[obj];
}
_29[_2c]=v;
return _2c;
};
this.delDtor=function(_2e){
delete _29[_2e];
};
this._dtorHandler=function(){
var k,v;
for(k in _29){
v=_29[k];
if(v&&(typeof v=="object")&&v.length){
try{
if(v.length==1){
v[0].call(null);
}else{
v[0][v[1]].call(v[0]);
}
}
catch(e){
}
try{
delete _29[k];
}
catch(e){
}
}
}
};
this.observe(window,"unload",this._onUnload);
this.addOnUnload(this._dtorHandler);
};
MQA._prEvent.element=function(_31){
return _31.target||_31.srcElement;
};
MQA._prEvent.isLeftClick=function(_32){
return ((_32.which&&(_32.which==1))||(_32.button&&(_32.button==1)));
};
MQA._prEvent.stop=function(_33){
if(_33.preventDefault){
_33.preventDefault();
_33.stopPropagation();
}else{
_33.returnValue=false;
_33.cancelBubble=true;
}
};
MQA._prEvent.falseFunction=function(){
return false;
};
MQA._prEvent.emptyFunction=function(){
};
MQA._prEvent.hitch=function(_34,_35){
var _36=[];
for(var i=2;i<arguments.length;i++){
_36.push(arguments[i]);
}
return function(){
return _34[_35].apply(_34,_36);
};
};
MQA._prEvent.EventCallback=function(_38,_39){
var _3a=_38;
return function(_3b){
if(_3a.turnEventsOff||(_3a.map&&_3a.map.turnEventsOff)){
return;
}
if(!_3b){
_3b=window.event;
}
_3a[_39](_3b);
};
};
MQA.Event=function(){
this.type="event";
this.srcObject=null;
if(arguments.length){
this.eventName=arguments[0];
}else{
this.eventName="unnamed event";
}
};
MQA.EventManager=new function(){
this.addListener=function(_3c,_3d,_3e,_3f){
_3d=_3d.toLowerCase();
if(!this.observers){
this.observers=[];
}
if(_3f==null){
_3f=_3c;
}
this.observers.push([_3c,_3d,_3e,_3f]);
};
this.removeListener=function(_40,_41,_42,_43){
_41=_41.toLowerCase();
if(this.observers){
if(_43==null){
_43=_40;
}
for(x=this.observers.length-1;x>=0;x--){
var _44=this.observers[x];
if(_44[0]==_40&&_44[1]==_41&&_44[2]==_42&&_44[3]==_43){
this.observers.splice(x,1);
}
}
}
};
this.clearListeners=function(_45,_46){
_46=_46.toLowerCase();
if(this.observers){
for(x=this.observers.length-1;x>=0;x--){
var _47=this.observers[x];
if(_47[0]==_45){
if(_46&&_47[1]!=_46){
continue;
}
this.observers.splice(x,1);
}
}
}
};
this.trigger=function(_48,_49,_4a){
_49=_49.toLowerCase();
if(this.observers){
_4a=_4a||{type:_4a};
for(var i=0,j=this.observers.length;i<j;i++){
var _4d=this.observers[i];
if(_4d[0]==_48&&_4d[1]==_49){
_4d[2].call(_4d[3],_4a);
}
}
}
};
};

MQA.tileMapCount=0;
MQA.getMapResources=function(){
return MQA.RESOURCES;
};
MQA.getStaticMapResources=function(){
return MQA.STATICRESOURCES;
};
MQA.incrTileMapCount=function(){
MQA.tileMapCount=MQA.tileMapCount+1;
return MQA.tileMapCount;
};
MQA.getTileMapCount=function(){
return MQA.tileMapCount;
};
MQA.getRowTile=function(_1,_2){
var y=(_1+90)*(MQA.PIXERSPERLATDEGREE/_2);
var RW=parseInt(y/MQA.TILESIZE);
return RW;
};
MQA.getRowTileOffset=function(_5,_6){
var y=(_5+90)*(MQA.PIXERSPERLATDEGREE/_6);
var RW=parseInt(y/MQA.TILESIZE);
return (y-RW*MQA.TILESIZE);
};
MQA.getLatTileRowOffset=function(TL,_a,_b){
var y=TL*MQA.TILESIZE+_a;
var _d=y/(MQA.PIXERSPERLATDEGREE/_b)-90;
_d=parseInt(_d*1000000)/1000000;
return _d;
};
MQA.getColTile=function(_e,_f){
var x=(_e+180)*(MQA.PIXERSPERLNGDEGREE/_f);
var _11=parseInt(x/MQA.TILESIZE);
return _11;
};
MQA.getColTileOffset=function(LNG,_13){
var x=(LNG+180)*(MQA.PIXERSPERLNGDEGREE/_13);
var _15=parseInt(x/MQA.TILESIZE);
return (x-_15*MQA.TILESIZE);
};
MQA.getLngTileColOffset=function(TL,_17,_18){
var x=TL*MQA.TILESIZE+_17;
var LNG=x/(MQA.PIXERSPERLNGDEGREE/_18)-180;
LNG=parseInt(LNG*1000000)/1000000;
while(LNG>180){
LNG-=360;
}
while(LNG<-180){
LNG+=360;
}
return LNG;
};

MQA.PointFloatXY=function(X,Y){
this.x=parseFloat(X);
this.y=parseFloat(Y);
};
MQA.PointXY=function(X,Y){
this.x=parseInt(X);
this.y=parseInt(Y);
};
MQA.PointLL=function(_5,_6){
this.lat=parseFloat(_5);
this.lng=parseFloat(_6);
};
MQA.Image=function(){
this.image=null;
};
MQA.TKObjectCollection=function(_7){
var _8=new Array();
var _9=_7||-1;
this.guid=MQA.Util._getRandomGUID(10);
this.collectionName="";
this.setName=function(n){
this.collectionName=n;
};
this.getName=function(){
return this.collectionName;
};
this._add=function(_b){
if(_9!=-1&&_8.length==_7){
return;
}
_8.push(_b);
};
this.add=function(_c){
this._add(_c);
return _8.length;
};
this.getSize=function(){
return _8.length;
};
this.getAt=function(_d){
return _8[_d];
};
this._remove=function(_e){
_8.splice(_e,1);
};
this._removeAll=function(){
while(_8.length>0){
this.remove(0);
}
};
this.remove=function(_f){
this._remove(_f);
return _8.splice(_f,1);
};
this.removeAll=function(){
this._removeAll();
};
this.contains=function(_10){
for(var _11=0,x=this.getSize();_11<x;_11++){
if(_8[_11]==_10){
return true;
}
}
return false;
};
this.getById=function(_13){
for(var _14=0,x=this.getSize();_14<x;_14++){
if(_8[_14].getId()==_13){
return _8[_14];
}
}
return null;
};
this.removeItem=function(_16){
for(i=0;i<_8.length;i++){
if(_8[i]==_16){
this.remove(i);
i=_8.length;
}
}
};
this.append=function(_17){
for(var i=0;i<_17.getSize();i++){
this.add(_17.getAt(i));
}
};
this.getItemIndex=function(_19){
var _1a=false;
for(var i=0;i<_8.length;i++){
if(_19==_8[i]){
_1a=i;
break;
}
}
return _1a;
};
};
MQA.ShapeCollection=function(){
MQA.TKObjectCollection.call(this);
this.map=null;
this.declutter=true;
this.maxZoomLevel=16;
this.minZoomLevel=1;
this.getByKey=function(key){
var j=this.getSize();
for(var i=0;i<j;i++){
if(key==this.getAt(i).getValue("key")){
return this.getAt(i);
}
}
return false;
};
this.add=function(obj){
obj.parentCollections.push(this);
if(this.map){
this.map.addShape(obj,false);
}
this._add(obj);
return this.getSize();
};
this.remove=function(_20){
if(this.getSize()>0){
var obj=this.getAt(_20);
for(var i=0;i<obj.parentCollections.length;i++){
if(obj.parentCollections[i]==this){
obj.parentCollections.splice(i,1);
}
}
if(this.map){
this.map.removeShape(obj,false);
}
this._remove(_20);
}
return this.getSize();
};
this.removeAll=function(){
if(this.map){
var _23=this.map.getDeclutter().getDeclutterMode();
if(_23!=0){
this.map.getDeclutter().setDeclutterMode(0);
}
}
this._removeAll();
if(this.map){
if(_23!=0){
this.map.getDeclutter().setDeclutterMode(_23);
}
}
};
this.setDeclutter=function(d){
if(this.map){
var _25=this.map.getDeclutter().getDeclutterMode();
if(_25!=0){
this.map.getDeclutter().setDeclutterMode(0);
}
}
this.declutter=d;
if(this.map){
if(_25!=0){
this.map.getDeclutter().setDeclutterMode(_25);
}
}
};
this.getDeclutter=function(){
return this.declutter;
};
this.setMinZoomLevel=function(z){
this.minZoomLevel=z;
};
this.getMinZoomLevel=function(){
return this.minZoomLevel;
};
this.setMaxZoomLevel=function(z){
this.maxZoomLevel=z;
};
this.getMaxZoomLevel=function(){
return this.maxZoomLevel;
};
this.inZoomWindow=function(){
if(!this.map){
return false;
}
var _28=this.map.getZoomLevel();
return (_28>=this.minZoomLevel&&_28<=this.maxZoomLevel);
};
this.isOnMap=function(){
return (this.map!=null);
};
this.getBoundingRect=function(){
if(this.getSize()==0){
return null;
}
var _29=null;
var _2a=[];
for(var i=0;i<this.getSize();i++){
_29=this.getAt(i);
if(_29 instanceof MQA.Poi){
_2a.push(_29.getValue("latLng"));
}else{
for(var j=0;j<_29.getValue("shapePoints").getSize();j++){
_2a.push(_29.getValue("shapePoints").getAt(j));
}
}
}
var _2d=new MQA.RectLL(_2a[0],_2a[0]);
for(var i=0;i<_2a.length;i++){
_2d.extend(_2a[i]);
}
return _2d;
};
};
MQA.MapLogo=function(){
throw new Error("Do NOT instantiate MapLogo - use static values");
};
MQA.MapLogo.MAPQUEST=MQA.LOGO_MQ_LOGO;
MQA.MapLogo.SCALES=MQA.LOGO_MQ_SCALES;
MQA.MapLogo.MAPQUEST_COPYRIGHT=MQA.LOGO_MQ_COPY;
MQA.MapLogo.NAVTEQ_COPYRIGHT=MQA.LOGO_NT_COPY;
MQA.MapLogo.ICUBED_COPYRIGHT=MQA.LOGO_I3_COPY;
MQA.MapCorner=function(){
throw new Error("Do NOT instantiate MapCorner - use static values");
};
MQA.MapCorner.TOP_LEFT=MQA.CORNER_TOPLEFT;
MQA.MapCorner.TOP_RIGHT=MQA.CORNER_TOPRIGHT;
MQA.MapCorner.BOTTOM_LEFT=MQA.CORNER_BOTTOMLEFT;
MQA.MapCorner.BOTTOM_RIGHT=MQA.CORNER_BOTTOMRIGHT;
MQA.MapCornerPlacement=function(_2e,_2f){
if(_2e==null){
_2e=MQA.MapCorner.TOP_LEFT;
}
if(_2f==null){
_2f=new MQA.Size(0,0);
}
this.mapCorner=_2e;
this.offsetSize=new MQA.Size(_2f.getWidth(),_2f.getHeight());
};
MQA.MapCornerPlacement.prototype.getMapCorner=function(){
return this.mapCorner;
};
MQA.MapCornerPlacement.prototype.getOffsetSize=function(){
return new MQA.Size(this.offsetSize.getWidth(),this.offsetSize.getHeight());
};
MQA.RectLL=function(_30,_31){
if(_30==null){
_30=new MQA.LatLng(0,0);
}
if(_31==null){
_31=new MQA.LatLng(0,0);
}
this.ul=new MQA.PointLL(_30.lat,_30.lng);
this.lr=new MQA.PointLL(_31.lat,_31.lng);
};
MQA.RectLL.prototype.setLowerRight=function(_32){
this.lr=new MQA.LatLng(_32.getLatitude(),_32.getLongitude());
};
MQA.RectLL.prototype.setUpperLeft=function(_33){
this.ul=new MQA.LatLng(_33.getLatitude(),_33.getLongitude());
};
MQA.RectLL.prototype.getUpperLeft=function(){
return new MQA.LatLng(this.ul.lat,this.ul.lng);
};
MQA.RectLL.prototype.getLowerRight=function(){
return new MQA.LatLng(this.lr.lat,this.lr.lng);
};
MQA.RectLL.prototype.setBounds=function(_34){
for(var i=1;i<_34.length;i++){
var _36=_34[i];
this.extend(_36);
}
};
MQA.RectLL.prototype.extend=function(_37){
if(_37.lat>this.ul.lat){
this.ul.lat=_37.lat;
}
if(_37.lng<this.ul.lng){
this.ul.lng=_37.lng;
}
if(_37.lat<this.lr.lat){
this.lr.lat=_37.lat;
}
if(_37.lng>this.lr.lng){
this.lr.lng=_37.lng;
}
};
MQA.RectXY=function(_38,_39){
if(_38==null){
_38=new MQA.Point(0,0);
}
if(_39==null){
_39=new MQA.Point(0,0);
}
this.ul=new MQA.PointXY(_38.x,_38.y);
this.lr=new MQA.PointXY(_39.x,_39.y);
};
MQA.RectXY.prototype.setUpperLeft=function(_3a){
this.ul=new MQA.Point(_3a.getX(),_3a.getY());
};
MQA.RectXY.prototype.setLowerRight=function(_3b){
this.lr=new MQA.Point(_3b.getX(),_3b.getY());
};
MQA.RectXY.prototype.getUpperLeft=function(){
return new MQA.Point(this.ul.x,this.ul.y);
};
MQA.RectXY.prototype.getLowerRight=function(){
return new MQA.Point(this.lr.x,this.lr.y);
};
MQA.Size=function(w,h){
if(w==null){
w=0;
}
if(h==null){
h=0;
}
this.width=parseInt(w);
this.height=parseInt(h);
};
MQA.Size.prototype.constructor=MQA.Size;
MQA.Size.prototype.getWidth=function(){
return this.width;
};
MQA.Size.prototype.getHeight=function(){
return this.height;
};
MQA.Size.prototype.setWidth=function(w){
this.width=parseInt(w);
};
MQA.Size.prototype.setHeight=function(h){
this.height=parseInt(h);
};
MQA.Size.prototype.toString=function(){
return this.width+","+this.height;
};
MQA.Clip=function(_40,_41,_42,_43,vIn,_45){
var _46=new Array();
var D=(_45?3:2);
if(vIn.length<D){
return _46;
}
_46=clipAgainstEdge(0,vIn,_45);
var _48=clipAgainstEdge(1,_46,_45);
var _49=clipAgainstEdge(2,_48,_45);
var _4a=clipAgainstEdge(3,_49,_45);
return _4a;
function clipAgainstEdge(_4b,_4c,_4d){
var v1;
var _4f,_50;
var _51;
var _52=new Array();
for(var v2=0;v2<_4c.length;v2++){
if(_45){
v1=(v2==0?_4c.length-1:v2-1);
}else{
v1=(v2==0?0:v2-1);
}
_4f=inside(_4b,_4c[v1]);
_50=inside(_4b,_4c[v2]);
if(_4f&&_50){
_52.push(_4c[v2]);
}else{
if(!_4f&&_50){
_51=clipIntersection(_4b,_4c[v2],_4c[v1]);
_52.push(_51);
_52.push(_4c[v2]);
}else{
if(_4f&&!_50){
_51=clipIntersection(_4b,_4c[v1],_4c[v2]);
_52.push(_51);
}
}
}
}
return _52;
}
function clipIntersection(_54,inv,_56){
var x1=inv.x;
var y1=inv.y;
var x2=_56.x;
var y2=_56.y;
var AU=0;
var _5c={x:0,y:0};
switch(_54){
case 0:
var x3=_40;
var y3=_42;
var x4=_40;
var y4=_43;
break;
case 1:
var x3=_41;
var y3=_42;
var x4=_41;
var y4=_43;
break;
case 2:
var x3=_40;
var y3=_43;
var x4=_41;
var y4=_43;
break;
case 3:
var x3=_40;
var y3=_42;
var x4=_41;
var y4=_42;
break;
}
UA=(((x4-x3)*(y1-y3))-((y4-y3)*(x1-x3)))/(((y4-y3)*(x2-x1))-((x4-x3)*(y2-y1)));
_5c.x=Math.round(x1+(UA*(x2-x1)));
_5c.y=Math.round(y1+(UA*(y2-y1)));
return _5c;
}
function inside(_61,v){
switch(_61){
case 0:
return (v.x>_40);
case 1:
return (v.x<_41);
case 2:
return (v.y<_43);
case 3:
return (v.y>_42);
}
return false;
}
};
MQA.MapInit=function(){
this.bestFitRect=null;
this.bestFitMargin=0;
this.keepCenter=false;
this.minZoom=1;
this.maxZoom=16;
};
MQA.MapInit.prototype={setBestFitRect:function(_63){
this.bestFitRect=_63;
},getBestFitRect:function(){
return this.bestFitRect;
},setBestFitMargin:function(_64){
this.bestFitMargin=_64;
},getBestFitMargin:function(){
return this.bestFitMargin;
},setKeepCenter:function(_65){
this.keepCenter=_65;
},isKeepCenter:function(){
return this.keepCenter;
},setMinZoom:function(_66){
_66=parseInt(_66);
if(_66<1||_66>15){
this.minZoom=1;
}else{
this.minZoom=_66;
}
if(this.minZoom>this.maxZoom){
this.minZoom=this.maxZoom;
}
},getMinZoom:function(){
return this.minZoom;
},setMaxZoom:function(_67){
_67=parseInt(_67);
if(_67<1||_67>16){
this.maxZoom=16;
}else{
this.maxZoom=_67;
}
if(this.maxZoom<this.minZoom){
this.maxZoom=this.minZoom;
}
},getMaxZoom:function(){
return this.maxZoom;
}};
MQA.Copyright=function(map,id,_6a,_6b,_6c,_6d){
this.map=map;
this.id=id;
this.text=_6a;
this.position=_6b;
this.handleEvents=false;
this.left=0;
this.top=0;
this.width=(_6c!=null)?100:_6c;
this.height=(_6d!=null)?15:_6d;
this.copyrightLayerDiv=null;
this.positionControl();
};
MQA.Copyright.prototype.positionControl=function(){
if(this.position.getMapCorner()==MQA.CORNER_TOPLEFT){
this.left=0;
this.top=0;
}else{
if(this.position.getMapCorner()==MQA.CORNER_TOPRIGHT){
this.left=this.map.width-parseInt(this.width);
this.top=0;
this.position.offsetSize.width*=-1;
}else{
if(this.position.getMapCorner()==MQA.CORNER_BOTTOMLEFT){
this.left=0;
this.top=this.map.height-parseInt(this.height);
this.position.offsetSize.height*=-1;
}else{
if(this.position.getMapCorner()==MQA.CORNER_BOTTOMRIGHT){
this.left=this.map.width-parseInt(this.width);
this.top=this.map.height-parseInt(this.height);
this.position.offsetSize.width*=-1;
this.position.offsetSize.height*=-1;
}
}
}
}
this.left+=this.position.offsetSize.width;
this.top+=this.position.offsetSize.height;
};
MQA.Copyright.prototype.draw=function(){
if(this.copyrightLayerDiv==null){
this.copyrightLayerDiv=MQA.Util.createParentDiv(this.id,0,0,"absolute",0,0,100,null,null);
this.copyrightLayerDiv.style.color="black";
this.copyrightLayerDiv.style.fontFamily="Arial,sans-serif";
this.copyrightLayerDiv.style.fontSize="11px";
this.copyrightLayerDiv.style.whiteSpace="nowrap";
this.copyrightLayerDiv.style.align="right";
this.copyrightLayerDiv.style.MozUserSelect="none";
this.copyrightLayerDiv.style.right="3px";
this.copyrightLayerDiv.style.bottom="2px";
this.copyrightLayerDiv.style.left=this.left+"px";
this.copyrightLayerDiv.style.top=this.top+"px";
this.copyrightLayerDiv.innerHTML="<span>"+this.text+"</span>";
this.copyrightLayerDiv.style.width=this.width+"px";
this.copyrightLayerDiv.style.height=this.height+"px";
if(this.handleEvents){
this.copyrightLayerDiv.style.cursor="pointer";
this.copyrightLayerDiv.style.cursor="hand";
this.eCopyrightClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.copyrightLayerDiv,"click",this.eCopyrightClick);
this.eCopyrightClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.copyrightLayerDiv,"mouseover",this.eCopyrightClick);
this.eCopyrightClick=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.copyrightLayerDiv,"mouseout",this.eCopyrightClick);
}
this.map.parent.appendChild(this.copyrightLayerDiv);
}
return this.copyrightLayerDiv;
};
MQA.Copyright.prototype.eventmonitor=function(evt){
var _6f=MQA._prEvent.element(evt);
switch(evt.type){
case "click":
var e=new MQA.Event("MQA.Copyright.click");
e.srcObject=this;
this.onClick(e);
case "mouseover":
var e=new MQA.Event("MQA.Copyright.mouseover");
e.srcObject=this;
this.onMouseOver(e);
break;
case "mouseout":
var e=new MQA.Event("MQA.Copyright.mouseout");
e.srcObject=this;
this.onMouseOver(e);
break;
}
};
MQA.Copyright.prototype.dispose=function(){
this.remove();
if(this.copyrightLayerDiv!=null){
this.copyrightLayerDiv=null;
}
this.map=null;
this.corner=null;
};
MQA.Copyright.prototype.remove=function(){
this.map.parent.removeChild(this.copyrightLayerDiv);
};
MQA.Copyright.prototype.setPosition=function(_71){
this.position=_71;
this.positionControl();
this.copyrightLayerDiv.style.left=this.left+"px";
this.copyrightLayerDiv.style.top=this.top+"px";
};
MQA.Copyright.prototype.show=function(){
if(this.copyrightLayerDiv!=null){
this.copyrightLayerDiv.style.visibility="visible";
this.copyrightLayerDiv.style.display="block";
}
};
MQA.Copyright.prototype.hide=function(){
if(this.copyrightLayerDiv!=null){
this.copyrightLayerDiv.style.visibility="hidden";
this.copyrightLayerDiv.style.display="none";
}
};
MQA.Copyright.prototype.onClick=function(e){
MQA.EventManager.trigger(this,"click",e);
};
MQA.Copyright.prototype.onMouseOver=function(e){
MQA.EventManager.trigger(this,"mouseover",e);
};
MQA.Copyright.prototype.onMouseOut=function(e){
MQA.EventManager.trigger(this,"mouseout",e);
};
MQA.CopyrightCollection=function(){
MQA.TKObjectCollection.call(this);
};
MQA.CopyrightCollection.prototype=new MQA.TKObjectCollection();
MQA.CopyrightCollection.prototype.constructor=MQA.CopyrightCollection;

MQA.InitOverlays=function(_1){
window.onload=_1;
};
MQA.ShapeOverlay=function(){
MQA.Base.call(this);
this.map=null;
this.className="MQA.ShapeOverlay";
this.key="";
this.color="#000000";
this.altColor=null;
this.colorAlpha="1";
this.altColorAlpha=null;
this.fillColor="#000000";
this.altFillColor=null;
this.fillColorAlpha="1";
this.altFillColorAlpha=null;
this.borderWidth="3";
this.altBorderWidth=null;
this.altStateFlag=false;
this.visible=true;
this.shapePoints=null;
this.shape=null;
this.maxZoomLevel=16;
this.minZoomLevel=1;
this.imageURL="";
this.imageLevels=null;
this.imageOpacity=1;
this.eClick=null;
this.eDoubleClick=null;
this.eMouseDown=null;
this.eMouseUp=null;
this.eMouseOver=null;
this.eMouseOut=null;
this._facio=function(_2,_3){
switch(_2){
case "color":
this._setColor(_3);
break;
case "altColor":
this._setAltColor(_3);
break;
case "colorAlpha":
this._setColorAlpha(_3);
break;
case "altColorAlpha":
this._setAltColorAlpha(_3);
break;
case "fillColor":
this._setFillColor(_3);
break;
case "altFillColor":
this._setAltFillColor(_3);
break;
case "fillColorAlpha":
this._setFillColorAlpha(_3);
break;
case "altFillColorAlpha":
this._setAltFillColorAlpha(_3);
break;
case "borderWidth":
this._setBorderWidth(_3);
break;
case "altBorderWidth":
this._setAltBorderWidth(_3);
break;
case "altStateFlag":
this._setAltStateFlag(_3);
break;
case "visible":
this._setVisible(_3);
break;
case "shapePoints":
this._setShapePoints(_3);
break;
case "maxZoomLevel":
this._setMaxZoomLevel(_3);
break;
case "minZoomLevel":
this._setMinZoomLevel(_3);
break;
case "imageURL":
this._setImageURL();
break;
case "imageLevels":
this._setImageOverlayLevels();
break;
case "imageOpacity":
this._setImageOpacity(_3);
break;
}
};
this._duco=function(_4){
switch(_4){
case "altColor":
return (this.altColor!=null?this.altColor:this.color);
break;
case "altColorAlpha":
return (this.altColorAlpha!=null?this.altColorAlpha:this.colorAlpha);
break;
case "altFillColor":
return (this.altFillColor!=null?this.altFillColor:this.fillColor);
break;
case "altFillColorAlpha":
return (this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);
break;
case "altBorderWidth":
return (this.altBorderWidth!=null?this.altBorderWidth:this.borderWidth);
break;
}
};
this.dispose=function(_5){
};
this._adjustXY=function(_6){
_6.x=_6.x+(MQA.SURFACE_OFFSET);
_6.y=_6.y+(MQA.SURFACE_OFFSET);
return _6;
};
this._setColor=function(_7){
if(this.shape&&!this.altStateFlag){
var _8=MQA.Graphics.normalizeColor(_7);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_8.hex);
break;
case "vml":
this.shape.stroke.color=_8.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltColor=function(_9){
if(this.shape&&this.altStateFlag){
var _a=MQA.Graphics.normalizeColor(_9);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_a.hex);
break;
case "vml":
this.shape.stroke.color=_a.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setColorAlpha=function(_b){
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-opacity",_b);
break;
case "vml":
this.shape.stroke.opacity=_b;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltColorAlpha=function(_c){
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-opacity",_c);
break;
case "vml":
this.shape.stroke.opacity=_c;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setFillColor=function(_d){
if(this.shape&&!this.altStateFlag){
var _e=MQA.Graphics.normalizeColor(_d);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill",_e.hex);
break;
case "vml":
this.shape.fill.color=_e.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltFillColor=function(_f){
if(this.shape&&this.altStateFlag){
var _10=MQA.Graphics.normalizeColor(_f);
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill",_10.hex);
break;
case "vml":
this.shape.fill.color=_10.hex;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setFillColorAlpha=function(_11){
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill-opacity",_11);
break;
case "vml":
this.shape.fill.opacity=_11;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltFillColorAlpha=function(_12){
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("fill-opacity",_12);
break;
case "vml":
this.shape.fill.opacity=_12;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setBorderWidth=function(_13){
if(this.shape&&!this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-width",_13);
break;
case "vml":
this.shape.stroke.weight=_13;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltBorderWidth=function(_14){
if(this.shape&&this.altStateFlag){
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke-width",_14);
break;
case "vml":
this.shape.stroke.weight=_14;
break;
case "canvas":
this.drawShape();
break;
}
}
};
this._setAltStateFlag=function(_15){
if(this.shape&&(this.className!="MQA.ImageOverlay")){
var _16=this._getCurrentState();
_16.color=MQA.Graphics.normalizeColor(_16.color).hex;
_16.fillColor=MQA.Graphics.normalizeColor(_16.fillColor).hex;
switch(MQA.Graphics.drawMethod){
case "svg":
this.shape.setAttribute("stroke",_16.color);
this.shape.setAttribute("stroke-opacity",_16.colorAlpha);
if(this.className!="MQA.LineOverlay"){
this.shape.setAttribute("fill",_16.fillColor);
this.shape.setAttribute("fill-opacity",_16.fillColorAlpha);
}
this.shape.setAttribute("stroke-width",_16.borderWidth);
break;
case "vml":
this.shape.stroke.color=_16.color;
this.shape.stroke.opacity=_16.colorAlpha;
if(this.className!="MQA.LineOverlay"){
this.shape.fill.color=_16.fillColor;
this.shape.fill.opacity=_16.fillColorAlpha;
}
this.shape.stroke.weight=_16.borderWidth;
break;
case "canvas":
this.drawShape();
break;
}
var _17=(this.className=="MQA.ImageOverlay"?this.shape.firstChild:this.shape);
_17.style.display=(_16.visible?"inline":"none");
}
};
this._setVisible=function(_18){
if(this.shape){
var _19=(this.className=="MQA.ImageOverlay"?this.shape.firstChild:this.shape);
_19.style.display=(_18?"inline":"none");
}
};
this._setMaxZoomLevel=function(_1a){
var _1b=parseInt(_1a);
if(isNaN(_1b)){
return;
}
this.maxZoomLevel=((_1b>16)?16:((_1b<this.minZoomLevel)?this.minZoomLevel:_1b));
this.redraw();
};
this._setMinZoomLevel=function(_1c){
var _1d=parseInt(_1c);
if(isNaN(_1d)){
return;
}
this.minZoomLevel=((_1d<1)?1:((_1d>this.maxZoomLevel)?this.maxZoomLevel:_1d));
this.redraw();
};
this._setShapePoints=function(_1e){
if(_1e.setLowerRight){
var _1f=new MQA.LatLngCollection();
_1f.add(new MQA.LatLng(_1e.ul.lat,_1e.ul.lng));
_1f.add(new MQA.LatLng(_1e.lr.lat,_1e.lr.lng));
_1e=_1f;
this.shapePoints=_1e;
}
if(this.shape){
this.drawShape();
}
};
this._getCurrentState=function(){
var _20=new Object();
if(!this.altStateFlag){
_20.color=this.color;
_20.colorAlpha=this.colorAlpha;
_20.fillColor=this.fillColor;
_20.fillColorAlpha=this.fillColorAlpha;
_20.borderWidth=this.borderWidth;
}else{
_20.color=(this.altColor!=null?this.altColor:this.color);
_20.colorAlpha=(this.altColorAlpha!=null?this.altColorAlpha:this.colorAlpha);
_20.fillColor=(this.altFillColor!=null?this.altFillColor:this.fillColor);
_20.fillColorAlpha=(this.altFillColorAlpha!=null?this.altFillColorAlpha:this.fillColorAlpha);
_20.borderWidth=(this.altBorderWidth!=null?this.altBorderWidth:this.borderWidth);
}
_20.visible=this.visible;
_20.url=this.url;
_20.maxZoomLevel=this.maxZoomLevel;
_20.minZoomLevel=this.minZoomLevel;
return _20;
};
this._cloneOverlay=function(_21){
this.key=_21.key;
this.color=_21.color;
this.altColor=_21.altColor;
this.colorAlpha=_21.colorAlpha;
this.altColorAlpha=_21.altColorAlpha;
this.fillColor=_21.fillColor;
this.altFillColor=_21.altFillColor;
this.fillColorAlpha=_21.fillColorAlpha;
this.altFillColorAlpha=_21.altFillColorAlpha;
this.borderWidth=_21.borderWidth;
this.altBorderWidth=_21.altBorderWidth;
this.altStateFlag=_21.altStateFlag;
this.visible=_21.visible;
this.maxZoomLevel=_21.maxZoomLevel;
this.minZoomLevel=_21.minZoomLevel;
this.shapePoints=_21.shapePoints;
if(this.className=="MQA.ImageOverlay"){
this.imageURL=_21.imageURL;
this.imageLevels=_21.imageLevels;
this.imageOpacity=_21.imageOpacity;
}
this.shape=null;
this.map=null;
},this.redraw=function(){
if(!this.map){
return;
}
this.drawShape();
};
this.onClick=function(e){
var mqe=new MQA.Event(this.className+".click");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"click",mqe);
mqe.srcObject=this;
this.map.onClick(mqe);
MQA._prEvent.stop(e);
};
this.onDoubleClick=function(e){
var mqe=new MQA.Event(this.className+".doubleClick");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"dblclick",mqe);
};
this.onMouseDown=function(e){
var mqe=new MQA.Event(this.className+".mouseDown");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mousedown",mqe);
};
this.onMouseUp=function(e){
var mqe=new MQA.Event(this.className+".mouseUp");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseup",mqe);
};
this.onMouseOver=function(e){
var mqe=new MQA.Event(this.className+".mouseOver");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseover",mqe);
MQA._prEvent.stop(e);
};
this.onMouseOut=function(e){
var mqe=new MQA.Event(this.className+".mouseOut");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseout",mqe);
MQA._prEvent.stop(e);
};
this.onRemoved=function(e){
MQA.EventManager.trigger(this,"removed",e);
};
this.drawShape=function(){
this.draw();
};
this.isOnMap=function(){
return (this.map!=null);
};
this.setKey=function(t){
this.setValue("key",t);
};
this.getKey=function(){
return this.getValue("key");
};
this.setAltBorderWidth=function(t){
this.setValue("altBorderWidth",t);
};
this.getAltBorderWidth=function(){
return this.getValue("altBorderWidth");
};
this.setAltColor=function(t){
this.setValue("altColor",t);
};
this.getAltColor=function(){
return this.getValue("altColor");
};
this.setAltColorAlpha=function(t){
this.setValue("altColorAlpha",t);
};
this.getAltColorAlpha=function(){
return this.getValue("altColorAlpha");
};
this.setAltFillColor=function(t){
this.setValue("altFillColor",t);
};
this.getAltFillColor=function(){
return this.getValue("altFillColor");
};
this.setAltFillColorAlpha=function(t){
this.setValue("altFillColorAlpha",t);
};
this.getAltFillColorAlpha=function(){
return this.getValue("altFillColorAlpha");
};
this.setAltStateFlag=function(t){
this.setValue("altStateFlag",t);
};
this.getAltStateFlag=function(){
return this.getValue("altStateFlag");
};
this.setBorderWidth=function(t){
this.setValue("borderWidth",t);
};
this.getBorderWidth=function(){
return this.getValue("borderWidth");
};
this.getClassName=function(){
return this.getValue("className");
};
this.setColor=function(t){
this.setValue("color",t);
};
this.getColor=function(){
return this.getValue("color");
};
this.setColorAlpha=function(t){
this.setValue("colorAlpha",t);
};
this.getColorAlpha=function(){
return this.getValue("colorAlpha");
};
this.setFillColor=function(t){
this.setValue("fillColor",t);
};
this.getFillColor=function(){
return this.getValue("fillColor");
};
this.setFillColorAlpha=function(t){
this.setValue("fillColorAlpha",t);
};
this.getFillColorAlpha=function(){
return this.getValue("fillColorAlpha");
};
this.setMaxZoomLevel=function(t){
this.setValue("maxZoomLevel",t);
};
this.getMaxZoomLevel=function(){
return this.getValue("maxZoomLevel");
};
this.setMinZoomLevel=function(t){
this.setValue("minZoomLevel",t);
};
this.getMinZoomLevel=function(){
return this.getValue("minZoomLevel");
};
this.setShapePoints=function(t){
this.setValue("shapePoints",t);
};
this.getShapePoints=function(){
return this.getValue("shapePoints");
};
this.setVisible=function(t){
this.setValue("visible",t);
};
this.getVisible=function(){
return this.getValue("visible");
};
};
MQA.RectangleOverlay=function(_3f){
MQA.ShapeOverlay.call(this);
this.className="MQA.RectangleOverlay";
if(_3f){
if(_3f.getValue("className")==this.className){
this._cloneOverlay(_3f);
}
}
this.draw=function(){
var xy1,xy2,_42,_43,_44,_45,_46,_47,_48;
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this._adjustXY(xy1);
xy2=this._adjustXY(xy2);
_45=xy1.x;
_46=xy2.x;
_47=xy1.y;
_48=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_46;
xy2.x=_45;
}
if(xy1.y>xy2.y){
xy1.y=_48;
xy2.y=_47;
}
_44=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_44.minZoomLevel)||(this.map.getZoomLevel()>_44.maxZoomLevel)){
return;
}
var _49=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _4a=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
xy1.x=(xy1.x<0?0:xy1.x);
xy1.y=(xy1.y<0?0:xy1.y);
xy2.x=(xy2.x>_49?_49:xy2.x);
xy2.y=(xy2.y>_4a?_4a:xy2.y);
_42=xy2.y-xy1.y;
_43=xy2.x-xy1.x;
_42=(_42>_4a?_4a:_42);
_43=(_43>_49?_49:_43);
if(!(_42<1||_43<1)){
var p=new Array();
p[0]=xy1;
p[1]=xy2;
this.shape=MQA.Graphics.drawRectangle(p,_44.color,_44.colorAlpha,_44.borderWidth,_44.fillColor,_44.fillColorAlpha,_44.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_4c){
if(this.shape==null){
return;
}
var _4c=(typeof (_4c)=="undefined"?false:_4c);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_4c){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.LineOverlay=function(_4d){
MQA.ShapeOverlay.call(this);
this.className="MQA.LineOverlay";
this.fillColorAlpha="0.0";
this.altFillColorAlpha="0.0";
if(_4d){
if(_4d.getValue("className")==this.className){
this._cloneOverlay(_4d);
}
}
this.override(["fillColor","altFillColor","fillColorAlpha","altFillColorAlpha"]);
this.draw=function(){
var i,j;
var xy=new Array;
for(i=0,j=this.shapePoints.getSize();i<j;i++){
var p=new Object;
p.x=this.map.llToPix(this.shapePoints.get(i)).x;
p.y=this.map.llToPix(this.shapePoints.get(i)).y;
p=this._adjustXY(p);
xy[i]=p;
}
var _52=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_52.minZoomLevel)||(this.map.getZoomLevel()>_52.maxZoomLevel)){
return;
}
var _53=new Array();
if(MQA.Util.isOverLimit(xy)){
var _54=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _55=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
_53=MQA.Clip(0,_54,0,_55,xy,false);
}else{
_53=xy;
}
if(_53.length){
this.shape=MQA.Graphics.drawLine(_53,_52.color,_52.colorAlpha,_52.borderWidth,_52.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_56){
if(this.shape==null){
return;
}
var _56=(typeof (_56)=="undefined"?false:_56);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_56){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.PolygonOverlay=function(_57){
MQA.ShapeOverlay.call(this);
this.className="MQA.PolygonOverlay";
if(_57){
if(_57.getValue("className")==this.className){
this._cloneOverlay(_57);
}
}
this.draw=function(){
var i,j;
var xy=new Array;
for(i=0,j=this.shapePoints.getSize();i<j;i++){
var p=new Object;
p.x=this.map.llToPix(this.shapePoints.get(i)).x;
p.y=this.map.llToPix(this.shapePoints.get(i)).y;
p=this._adjustXY(p);
xy[i]=p;
}
var _5c=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_5c.minZoomLevel)||(this.map.getZoomLevel()>_5c.maxZoomLevel)){
return;
}
var _5d=new Array();
if(MQA.Util.isOverLimit(xy)){
var _5e=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _5f=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
_5d=MQA.Clip(0,_5e,0,_5f,xy,true);
}else{
_5d=xy;
}
if(_5d.length){
this.shape=MQA.Graphics.drawPolygon(_5d,_5c.color,_5c.colorAlpha,_5c.borderWidth,_5c.fillColor,_5c.fillColorAlpha,_5c.visible);
this.map.surface.appendChild(this.shape);
}
if(this.shape&&MQA.Graphics.eventsActive){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_60){
if(this.shape==null){
return;
}
var _60=(typeof (_60)=="undefined"?false:_60);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_60){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.EllipseOverlay=function(_61){
MQA.ShapeOverlay.call(this);
this.className="MQA.EllipseOverlay";
if(_61){
if(_61.getValue("className")==this.className){
this._cloneOverlay(_61);
}
}
this.draw=function(){
var xy1,xy2,_64,_65,_66,_67,_68,_69,_6a;
var _6b,_6c,_6d,_6e;
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this._adjustXY(xy1);
xy2=this._adjustXY(xy2);
_67=xy1.x;
_68=xy2.x;
_69=xy1.y;
_6a=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_68;
xy2.x=_67;
}
if(xy1.y>xy2.y){
xy1.y=_6a;
xy2.y=_69;
}
_6b=Math.round((xy2.x-xy1.x)/2);
_6c=Math.round((xy2.y-xy1.y)/2);
_6d=xy1.x+_6b;
_6e=xy1.y+_6c;
var _6f=parseInt(this.map.overlaydiv.style.height.substr(0,(this.map.overlaydiv.style.height.length)-2));
var _70=parseInt(this.map.overlaydiv.style.width.substr(0,(this.map.overlaydiv.style.width.length)-2));
var _71=0;
if((xy1.x>_6f)||(xy2.x<0)||(xy1.y>_70)||(xy2.y<0)){
_71=1;
}
if(!_71){
var x,y,c;
var _75=false;
x=0;
y=0;
_75=((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1;
if(_75){
x=_6f;
y=0;
_75=_75&&(((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1);
if(_75){
x=0;
y=_70;
_75=_75&&(((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1);
if(_75){
x=_6f;
y=_70;
_75=_75&&(((x-_6d)*(x-_6d)/(_6b*_6b)+(y-_6e)*(y-_6e)/(_6c*_6c))<1);
}
}
}
if(_75){
_71=2;
}
}
if(!_71){
if((_6b*2)>32000||(_6c*2)>32000){
_71=3;
}
}
var _66=this._getCurrentState();
if(this.shape!=null){
this.shape=MQA.Graphics.remove(this.map.surface,this.shape);
}
if((this.map.getZoomLevel()<_66.minZoomLevel)||(this.map.getZoomLevel()>_66.maxZoomLevel)){
return;
}
switch(_71){
case 0:
if(_6b>1&&_6c>1){
var p=new Array();
p[0]=xy1;
p[1]=xy2;
this.shape=MQA.Graphics.drawEllipse(p,_66.color,_66.colorAlpha,_66.borderWidth,_66.fillColor,_66.fillColorAlpha,_66.visible);
this.map.surface.appendChild(this.shape);
}
break;
case 1:
break;
case 2:
this.shape=MQA.Graphics.drawRectangle(p,_66.color,_66.colorAlpha,_66.borderWidth,_66.fillColor,_66.fillColorAlpha,_66.visible);
this.map.surface.appendChild(this.shape);
break;
case 3:
break;
}
if(this.shape){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this.dispose=function(_77){
if(this.shape==null){
return;
}
var _77=(typeof (_77)=="undefined"?false:_77);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_77){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.shape);
MQA.Util._deleteDOMObject(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
};
MQA.ImageOverlay=function(_78){
MQA.ShapeOverlay.call(this);
this.className="MQA.ImageOverlay";
this.imageURL=null;
this.imageLevels=null;
this.imageOpacity=1;
if(_78){
if(_78.getValue("className")==this.className){
this._cloneOverlay(_78);
}
}
this.draw=function(){
var xy1,xy2,_7b,_7c,_7d,_7e,_7f,_80,_81,_82,_83,_84,_85,_86;
_7d=this._getCurrentState();
if(this.imageLevels){
_83=this.map.getZoomLevel();
_84=17;
for(var i=0,j=this.imageLevels.length;i<j;i++){
if(this.imageLevels[i].zoomLevel==_83){
_82=this.imageLevels[i].url;
break;
}else{
_85=Math.abs(this.imageLevels[i].zoomLevel-_83);
if(_85<_84){
_82=this.imageLevels[i].url;
_84=_85;
}
}
}
_7d.imageURL=_82;
}else{
_7d.imageURL=this.imageURL;
}
xy1=this.map.llToPix(this.shapePoints.get(0));
xy2=this.map.llToPix(this.shapePoints.get(1));
xy1=this._adjustXY(xy1);
xy2=this._adjustXY(xy2);
_7e=xy1.x;
_7f=xy2.x;
_80=xy1.y;
_81=xy2.y;
if(xy1.x>xy2.x){
xy1.x=_7f;
xy2.x=_7e;
}
if(xy1.y>xy2.y){
xy1.y=_81;
xy2.y=_80;
}
if(this.shape!=null){
this.shape.firstChild.style.width="0px";
this.shape.firstChild.height="0px";
this.shape.firstChild.src="";
this.shape.removeChild(this.shape.firstChild);
this.shape=this.map.overlaydiv.removeChild(this.shape);
this.shape=null;
}
if((this.map.getZoomLevel()<_7d.minZoomLevel)||(this.map.getZoomLevel()>_7d.maxZoomLevel)){
return;
}
if(this.map.getDragOffset().x!=this.map.overlayOffsetX||this.map.getDragOffset().y!=this.map.overlayOffsetY){
this.map.overlayOffsetX=this.map.getDragOffset().x;
this.map.overlayOffsetY=this.map.getDragOffset().y;
if(this.map.overlaydiv){
this.map.overlaydiv.style.left=-(MQA.SURFACE_OFFSET+this.map.overlayOffsetX)+"px";
this.map.overlaydiv.style.top=-(MQA.SURFACE_OFFSET+this.map.overlayOffsetY)+"px";
}
}
_7b=xy2.y-xy1.y;
_7c=xy2.x-xy1.x;
if(!(_7b<1||_7c<1)){
this.shape=document.createElement("div");
this.shape.style.position="absolute";
this.shape.style.left=xy1.x+"px";
this.shape.style.top=xy1.y+"px";
this.map.overlaydiv.appendChild(this.shape);
var _89=document.createElement("img");
_89.GALLERYIMG="no";
_89.width=_7c;
_89.height=_7b;
_89.style.height=_7b+"px";
_89.style.width=_7c+"px";
_89.src=_7d.imageURL;
_89.UNSELECTABLE="on";
_89.MozUserSelect="none";
this.shape.appendChild(_89);
this.shape.firstChild.style.display=(_7d.visible?"inline":"none");
if(MQA.browser.name=="msie"){
this.shape.firstChild.style.filter="alpha(opacity="+(this.imageOpacity*100)+")";
}
this.shape.firstChild.style.MozOpacity=this.imageOpacity;
this.shape.firstChild.style.opacity=this.imageOpacity;
}
if(this.shape){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
}
};
this._setImageURL=function(){
if(this.imageLevels==null&&this.shape!=null){
this.drawShape();
}
};
this._setImageOverlayLevels=function(){
if(this.shape!=null){
this.drawShape();
}
};
this._setImageOpacity=function(op){
if(this.shape){
if(MQA.browser.name=="msie"){
this.shape.firstChild.style.filter="alpha(opacity="+(op*100)+")";
}
this.shape.firstChild.style.MozOpacity=op;
this.shape.firstChild.style.opacity=op;
}
};
this.dispose=function(_8b){
if(this.shape==null){
return;
}
var _8b=(typeof (_8b)=="undefined"?false:_8b);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(_8b){
this.parentCollections=null;
this.shape.innerHTML=null;
MQA.Util._deleteDOMObject(this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}else{
this.shape.innerHTML=null;
MQA.Graphics.remove(this.map.surface,this.shape);
MQA.Util._setOuterHTMLToEmptyString(this.shape);
}
this.map=null;
this.shape=null;
};
this.setImageOpacity=function(t){
this.setValue("imageOpacity",t);
};
this.getImageOpacity=function(){
return this.getValue("imageOpacity");
};
this.setImageOverlayLevels=function(t){
this.setValue("imageLevels",t);
};
this.getImageOverlayLevels=function(){
return this.getValue("imageLevels");
};
this.setImageURL=function(t){
this.setValue("imageURL",t);
};
this.getImageURL=function(){
return this.getValue("imageURL");
};
};
MQA.ImageLevel=function(url,_90){
this.url=url;
this.zoomLevel=_90;
};
ImageOverlayLevel=MQA.ImageLevel;

MQA.Icon=function(_1,_2,_3){
this.imageURL=_1;
this.width=parseInt(_2);
this.height=parseInt(_3);
};
MQA.Poi=function(_4,_5){
MQA.Base.call(this);
this.map=null;
this.className="MQA.Poi";
this.key="";
this.shape=null;
this._icon=null;
this._shadow=null;
this._label=null;
this._leaderLineDotIconDiv=null;
this.latLng=MQA.Util._cloneValue(_4);
if(typeof (_5)!="undefined"&&_5 instanceof MQA.Icon){
this.icon=MQA.Util._cloneValue(_5);
}else{
this.icon=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/star.png",29,29);
}
this.iconOffset=new MQA.PointXY(-Math.round(this.icon.width/2),-Math.round(this.icon.height/2));
this.shadow=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/shadow.png",23,7);
this.shadowOffset=new MQA.Point(6,0);
this.infoWindowOffset=new MQA.Point(Math.round(this.icon.width/2),0);
this.altIcon=null;
this.altIconOffset=null;
this.altShadow=null;
this.altShadowOffset=null;
this.altInfoWindowOffset=null;
this.declutterIcon=null;
this.declutterIconOffset=null;
this.declutterShadow=null;
this.declutterShadowOffset=null;
this.declutterInfoWindowOffset=null;
this.HTMLContent=null;
this.HTMLOffset=null;
this.HTMLInfoWindowOffset=null;
this.blankImageURL=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.altStateFlag=false;
this.visible=true;
this.infoContentHTML=null;
this.infoTitleHTML=null;
this.rolloverEnabled=true;
this.showingInfo=false;
this.mqrw=null;
this.mqiw=null;
this.labelText=null;
this.labelClass="mq-poi-label";
this.labelVisible=true;
this.draggable=false;
this.isDragging=false;
this.dragFlag=false;
this.snapback=false;
this.keepRolloverOnDrag=true;
this.mouseStartX=null;
this.mouseStartY=null;
this.shapeStartX=null;
this.shapeStartY=null;
this.isMouseOver=false;
this.leaderLine=false;
this.leaderLineDot=false;
this.leaderLineDotIcon=null;
this.leaderLineColor=null;
this.leaderLineDotImage=null;
this.dragTop=null;
this.dragLeft=null;
this.isDecluttered=false;
this.minZoomLevel=1;
this.maxZoomLevel=16;
this.maxInfoWindowWidth=null;
this.titleBackgroundColor=null;
this.infoWindowTitleText=null;
this.eClick=null;
this.eDoubleClick=null;
this.eMouseDown=null;
this.eMouseUp=null;
this.eMouseOver=null;
this.eMouseOut=null;
this._facio=function(_6,_7){
switch(_6){
case "HTMLContent":
this.HTMLOffset=(this.HTMLOffset?this.HTMLOffset:new MQA.Point(0,0));
if(this.shape){
this.draw();
}
break;
case "HTMLOffset":
if(this.shape){
this.draw();
}
break;
case "icon":
if(!this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "iconOffset":
if(this.shape&&!this.isDecluttered&&!this.altStateFlag){
this.draw();
}
break;
case "shadow":
if(this.shape&&!this.isDecluttered&&!this.altStateFlag){
this.draw();
}
break;
case "shadowOffset":
if(this.shape&&!this.isDecluttered&&!this.altStateFlag){
this.draw();
}
break;
case "altIcon":
this.altIconOffset=(this.altIconOffset?this.altIconOffset:new MQA.PointXY(-Math.round(this.altIcon.width/2),-Math.round(this.altIcon.height/2)));
if(this.altStateFlag&&this.shape){
this.draw();
}
break;
case "altIconOffset":
if(!this.isDecluttered&&this.altStateFlag&&this.shape){
this.draw();
}
break;
case "altShadow":
if(this.shape&&this.altStateFlag){
this.draw();
}
break;
case "altShadowOffset":
if(!this.isDecluttered&&this.altStateFlag&&this.shape){
this.draw();
}
break;
case "declutterIcon":
this.declutterIconOffset=(this.declutterIconOffset?this.declutterIconOffset:new MQA.PointXY(-Math.round(this.declutterIcon.width/2),-Math.round(this.declutterIcon.height/2)));
if(this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "declutterIconOffset":
if(this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "declutterShadow":
if(this.shape&&!this.altStateFlag&&this.isDecluttered){
this.draw();
}
break;
case "declutterShadowOffset":
if(this.isDecluttered&&!this.altStateFlag&&this.shape){
this.draw();
}
break;
case "visible":
if(this.shape){
this.shape.style.display=(_7?"block":"none");
}
if(this.map){
if(!_7&&this.leaderLine){
this.map.getDeclutter().leaderLineDispose(this);
}else{
if(this.dragTop||this.dragLeft){
if(!this.leaderLine){
this.map.getDeclutter().drawLeaderLine(this);
}
}
}
}
break;
case "latLng":
if(this.shape){
this.draw();
}
break;
case "altStateFlag":
if(this.shape){
this.draw();
}
break;
case "isDecluttered":
if(this.shape){
this.draw();
}
break;
case "labelText":
this._setLabelText();
break;
case "labelVisible":
if(this.shape&&this._label){
var _8=1;
if(theShadowImage!=null){
_8+=1;
}
this.shape.childNodes[_8].style.display=(_7?"block":"none");
this._centerLabel();
}
break;
case "labelClass":
if(this.shape&&this._label){
this.draw();
}
break;
case "zIndex":
this._setZIndex(_7);
break;
case "infoTitleHTML":
this._setInfoTitleHTML(_7);
break;
case "infoContentHTML":
this._setInfoContentHTML(_7);
break;
case "leaderLineColor":
this._setLeaderLineColor(_7);
break;
case "leaderLineDotImage":
this._setLeaderLineDotImage(_7);
break;
case "minZoomLevel":
if(this.map){
if(this.map.getZoomLevel()<this.minZoomLevel){
this.setValue("visible",false);
}else{
this.setValue("visible",true);
}
}
break;
case "maxZoomLevel":
if(this.map){
if(this.map.getZoomLevel()>this.maxZoomLevel){
this.setValue("visible",false);
}else{
this.setValue("visible",true);
}
}
break;
}
};
this._duco=function(_9){
switch(_9){
case "latLng":
return MQA.Util._cloneValue(this.latLng);
break;
case "altIcon":
return (this.altIcon?this.altIcon:this.icon);
break;
case "altIconOffset":
var _a=this.getValue("altIcon");
return (this.altIconOffset?this.altIconOffset:new MQA.PointXY(-Math.round(_a.width/2),-Math.round(_a.height/2)));
break;
case "altShadow":
return (this.altShadow?this.altShadow:this.shadow);
break;
case "altShadowOffset":
return (this.altShadowOffset?this.altShadowOffset:this.shadowOffset);
break;
case "altInfoWindowOffset":
return (this.altInfoWindowOffset?this.altInfoWindowOffset:this.infoWindowOffset);
break;
case "declutterIcon":
return (this.declutterIcon?this.declutterIcon:this.icon);
break;
case "declutterIconOffset":
var _a=this.getValue("declutterIcon");
return (this.declutterOffset?this.declutterOffset:new MQA.PointXY(-Math.round(_a.width/2),-Math.round(_a.height/2)));
break;
case "declutterShadow":
return (this.declutterShadow?this.declutterShadow:this.shadow);
break;
case "declutterShadowOffset":
return (this.declutterShadowOffset?this.declutterShadowOffset:this.shadowOffset);
break;
case "declutterInfoWindowOffset":
return (this.declutterInfoWindowOffset?this.declutterInfoWindowOffset:this.infoWindowOffset);
break;
case "draggable":
return this._getDraggable();
break;
case "leaderLineColor":
return this._getLeaderLineColor();
break;
case "leaderLineDotImage":
return this._getLeaderLineDotImage();
break;
}
};
this.draw=function(){
var _b=(this.shape?false:true);
var _c;
var _d,_e,_f;
var _10=null;
var _11=null;
var _12=null;
var _13=null;
var _14=this._getCurrentInfo();
_10=_14.icon;
_11=_14.offset;
theShadowImage=_14.shadow;
_13=_14.shadowOffset;
if(!_b){
_c={x:parseInt(this.shape.style.left),y:parseInt(this.shape.style.top)};
}else{
_c={x:0,y:0};
}
if(_b){
this.shape=document.createElement("div");
this.shape.id="poi.shape.div";
var _15=this.map.llToPix(this.latLng);
this.shape.style.left=((_15.x+_11.x)-this.map.getDragOffset().x)+"px";
this.shape.style.top=((_15.y+_11.y)-this.map.getDragOffset().y)+"px";
this.shape.style.display=(this.visible?"block":"none");
var _16=this.map.getZoomLevel();
if(_16<this.minZoomLevel||_16>this.maxZoomLevel){
this.shape.style.display="none";
}
this.shape.style.position="absolute";
this.shape.setAttribute("unselectable","on");
this.shape.style.MozUserSelect="none";
this.shape.style.zIndex=90;
}else{
if(this.getValue("isDecluttered")){
var myX=this.shapeStartX-this.dragLeft;
var myY=this.shapeStartY-this.dragTop;
var _19={x:(_c.x),y:(_c.y)};
}else{
var _15=this.map.llToPix(this.latLng);
var _19={x:(_15.x+_11.x)-this.map.getDragOffset().x,y:(_15.y+_11.y)-this.map.getDragOffset().y};
}
this.shape.style.left=_19.x+"px";
this.shape.style.top=_19.y+"px";
}
if(this.HTMLContent){
this.shape.innerHTML=this.HTMLContent;
this._icon=false;
this._shadow=false;
this._label=false;
}else{
if(!this._icon&&!this._shadow&&!this._label){
this.shape.innerHTML="";
}
var _1a=(this._icon?false:true);
if(_1a){
_d=document.createElement("img");
_d.setAttribute("unselectable","on");
_d.style.MozUserSelect="none";
_d.style.display="block";
}else{
_d=this.shape.firstChild;
}
if((MQA.Util._hasPngExtention(_10.imageURL))&&(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5))){
_d.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_10.imageURL+"', sizingMethod='image')";
_d.src=this.blankImageURL;
}else{
_d.src=_10.imageURL;
}
if(_10.width){
_d.width=_10.width;
_d.style.width=_10.width+"px";
}
if(_10.height){
_d.height=_10.height;
_d.style.height=_10.height+"px";
}
if(_1a){
this.shape.appendChild(_d);
}
_d=null;
this._icon=true;
if(theShadowImage!=null){
var _1b=(this._shadow?false:true);
if(_1b){
_e=document.createElement("img");
_e.setAttribute("unselectable","on");
_e.style.MozUserSelect="none";
_e.style.display="block";
}else{
_e=this.shape.childNodes[1];
}
if((MQA.Util._hasPngExtention(theShadowImage.imageURL))&&(MQA.browser.name=="msie"&&((MQA.browser.version<7)&&MQA.browser.version>5))){
_e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+theShadowImage.imageURL+"', sizingMethod='image')";
_e.src=this.blankImageURL;
}else{
_e.src=theShadowImage.imageURL;
}
_e.width=theShadowImage.width;
_e.height=theShadowImage.height;
_e.style.marginLeft=_13.x+"px";
_e.style.marginTop=_13.y+"px";
if(_1b){
this.shape.appendChild(_e);
}
_e=null;
this._shadow=true;
}else{
if(this._shadow){
this.shape.removeChild(this.shape.childNodes[1]);
this._shadow=false;
}
}
if(!this._label&&this.labelText){
_f=this._createLabel();
this.shape.appendChild(_f);
_f=null;
this._label=true;
}
}
if(_b){
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.shape,"click",this.eClick);
MQA._prEvent.observe(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.observe(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.observe(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.observe(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.shape,"mouseout",this.eMouseOut);
this.map.div.poidiv.appendChild(this.shape);
this.mqrw=this.map.getRolloverWindow();
this.mqiw=this.map.getInfoWindow();
}
this._centerLabel();
if(!this.icon.width){
this.icon.width=this.shape.firstChild.offsetWidth;
}
if(!this.icon.height){
this.icon.height=this.shape.firstChild.offsetHeight;
}
};
this.dispose=function(_1c){
var _1c=(typeof (_1c)=="undefined"?false:_1c);
MQA._prEvent.stopObserving(this.shape,"click",this.eClick);
MQA._prEvent.stopObserving(this.shape,"dblclick",this.eDoubleClick);
MQA._prEvent.stopObserving(this.shape,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.shape,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(this.shape,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.shape,"mouseout",this.eMouseOut);
if(this.leaderLine){
this.map.getDeclutter().leaderLineDispose(this);
}
this._icon=false;
this._label=false;
this._shadow=false;
this.map=null;
if(this.showingInfo){
this.onInfoWindowClose();
}
if(_1c){
if(this.infoContentHTML){
this.infoContentHTML.innerHTML=null;
this.infoContentHTML.outerHTML="";
MQA.Util._deleteDOMObject(this.infoContentHTML);
this.infoContentHTML=null;
}
if(this.infoTitleHTML){
this.infoTitleHTML.innerHTML=null;
this.infoTitleHTML.outerHTML="";
MQA.Util._deleteDOMObject(this.infoTitleHTML);
this.infoTitleHTML=null;
}
this.mqrw=null;
this.mqiw=null;
this._parentCollections=null;
this.shape.innerHTML=null;
this.shape.outerHTML="";
MQA.Util._deleteDOMObject(this.shape);
this.shape=null;
}else{
if(this.mqiw.popup.parentNode==this.shape){
this.shape.removeChild(this.mqiw.popup);
}
if(this.mqrw.minipopup.parentNode==this.shape){
this.shape.removeChild(this.mqrw.minipopup);
}
MQA.Util._nukeChildren(this.shape);
this.mqrw=null;
this.mqiw=null;
this.shape=null;
}
};
this.onClick=function(e){
if(MQA._prEvent.element(e).id=="poiclose"||MQA._prEvent.element(e).parentNode.id=="poiclose"){
return;
}
if(!this.dragFlag||(this.dragFlag&&(Math.abs(this.mouseStartX-e.clientX)<3&&Math.abs(this.mouseStartY-e.clientY)<3))){
this.showInfoWindow();
var mqe=new MQA.Event("MQA.Poi.click");
var _1f=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_1f.x;
var cy=e.clientY-_1f.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
MQA.EventManager.trigger(this,"click",mqe);
mqe.srcObject=this;
this.map.onClick(mqe);
MQA._prEvent.stop(e);
}
if(this.mqiw!=null&&this.mqiw.opener==this){
return;
}
this.dragFlag=false;
};
this.onDoubleClick=function(e){
var mqe=new MQA.Event("MQA.Poi.dblClick");
var _24=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_24.x;
var cy=e.clientY-_24.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
MQA.EventManager.trigger(this,"dblclick",mqe);
mqe.srcObject=this;
this.map.onDoubleClick(mqe);
MQA._prEvent.stop(e);
};
this.onMouseDown=function(e){
var mqe=new MQA.Event("MQA.Poi.mouseDown");
var _29=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_29.x;
var cy=e.clientY-_29.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
if(this.getValue("draggable")){
poiMouseDownFlg=this._isMouseOnPoi(e);
if(!poiMouseDownFlg){
MQA.EventManager.trigger(this,"mousedown",mqe);
return;
}
if(typeof this.map.parent2.onselectstart!="undefined"){
this.map.div.poidiv.onselectstart=MQA._prEvent.falseFunction;
}
this.shape.style.zIndex=110;
if(isNaN(parseInt(this.shape.style.left))){
this.shape.style.left=0;
}
if(isNaN(parseInt(this.shape.style.top))){
this.shape.style.top=0;
}
this.shapeStartX=parseInt(this.shape.style.left);
this.shapeStartY=parseInt(this.shape.style.top);
this.mouseStartX=e.clientX;
this.mouseStartY=e.clientY;
this.isDragging=true;
this.map.draggedObject=this;
if(this.map.getDeclutter()){
this.map.getDeclutter().leaderLineDispose(this);
}
if(this.map.getDeclutter()){
if(!this.map.getDeclutter().keepRolloversOnDrag&&this.map.getDeclutter().getDeclutterMode()==2){
if(this._isRolloverShowable()){
}
}else{
if(!this.keepRolloverOnDrag){
if(this._isRolloverShowable()){
this.mqrw.hide();
}
}
}
}else{
if(!this.keepRolloverOnDrag){
if(this._isRolloverShowable()){
this.mqrw.hide();
}
}
}
if(e.preventDefault){
e.preventDefault();
}
MQA._prEvent.stop(e);
if(this.mqiw&&this.mqiw.opener==this){
this.mqiw.setPopupContentOverflow("hidden");
}
}
MQA.EventManager.trigger(this,"mousedown",mqe);
};
this.onMouseUp=function(e){
var mqe=new MQA.Event("MQA.Poi.mouseUp");
var _2e=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_2e.x;
var cy=e.clientY-_2e.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.button=(MQA._prEvent.isLeftClick(e))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
mqe.domEvent=e;
if(this.isDragging){
if(this._isRolloverShowable()&&!this.map.getDeclutter().keepRolloversOnDrag){
this.mqrw.setOpenerAndShow(this);
this.shape.style.zIndex=110;
}
if(this.map.getDeclutter().getDeclutterMode()==2){
this.isDecluttered=true;
}
this.finishDrag(mqe);
}
if(typeof this.map.parent2.onselectstart!="undefined"){
this.map.div.poidiv.onselectstart="";
}
MQA.EventManager.trigger(this,"mouseup",mqe);
};
this.finishDrag=function(mqe){
var _32=(MQA.browser.name=="safari");
this.isDragging=false;
var _33=this.map.getDragOffset();
if(this.HTMLContent){
var _34=this.getValue("HTMLOffset").x;
var _35=this.getValue("HTMLOffset").y;
}else{
if(this.getValue("altStateFlag")){
var _34=this.getValue("altIconOffset").x;
var _35=this.getValue("altIconOffset").y;
}else{
var _34=this.getValue("iconOffset").x;
var _35=this.getValue("iconOffset").y;
}
}
var _36=(parseInt(this.shape.style.left)-_34)+_33.x;
var _37=(parseInt(this.shape.style.top)-_35)+_33.y;
this.dragFlag=true;
if((Math.abs(this.shapeStartX-parseInt(this.shape.style.left))>3)||(Math.abs(this.shapeStartY-parseInt(this.shape.style.top)>3))){
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2&&!this.getValue("altStateFlag")){
this.setValue("isDecluttered",true);
}
}
}else{
this.onClick(mqe.domEvent);
}
var _38=(this.map.getDeclutter()?this.map.getDeclutter().getDeclutterMode():0);
if(this.snapback&&_38!=2){
this.shape.style.left=this.shapeStartX+"px";
this.shape.style.top=this.shapeStartY+"px";
}else{
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==0){
this.setValue("latLng",this.map.pixToLL(new MQA.Point(_36,_37)));
}else{
if(this.map.getDeclutter().getDeclutterMode()==2){
theLatLngXY=this.map.llToPix(this.getValue("latLng"));
this.dragLeft=theLatLngXY.x-(_33.x+parseInt(this.shape.style.left));
this.dragTop=theLatLngXY.y-(_33.y+parseInt(this.shape.style.top));
if(this.isDecluttered||(Math.abs(this.shapeStartX-parseInt(this.shape.style.left))>3)||(Math.abs(this.shapeStartY-parseInt(this.shape.style.top))>3)||this.getValue("altStateFlag")){
if(!_32){
this.map.getDeclutter().drawLeaderLine(this);
}else{
this.map.getDeclutter().redrawLeaderLines();
}
}
}else{
}
}
}else{
this.setValue("latLng",this.map.pixToLL(new MQA.Point(_36,_37)));
}
}
this.map.draggedObject=null;
if(this.mqiw&&this.mqiw.opener==this){
this.mqiw.setPopupContentOverflow("auto");
}
};
this.onMouseOver=function(e){
if(MQA.Util.isMouseLeaveOrEnter(e,this.shape)){
this.isMouseOver=true;
var mqe=new MQA.Event("MQA.Poi.mouseOver");
mqe.domEvent=e;
var _3b=(this.map.draggedObject&&this.map._mapShapes.contains(this.map.draggedObject)&&this.map.draggedObject.isDragging)?true:false;
if(!this.isDragging&&!_3b&&(this.mqrw.isHidden()||this.mqrw.opener!=this)){
this.showRolloverWindow(mqe);
}
MQA.EventManager.trigger(this,"mouseover",mqe);
}
};
this.onMouseOut=function(e){
if(MQA.Util.isMouseLeaveOrEnter(e,this.shape)){
if(this._isRolloverShowable()&&!this.isDragging&&this.mqrw.opener==this){
this.mqrw.hide();
}
var mqe=new MQA.Event("MQA.Poi.mouseOut");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"mouseout",mqe);
}
};
this.onInfoWindowOpen=function(e){
this.shape.style.zIndex=110;
var mqe=new MQA.Event("MQA.Poi.infoWindowOpen");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"infowindowopen",mqe);
};
this.onInfoWindowClose=function(e){
this.showingInfo=false;
this.shape.style.zIndex=90;
if(this.isDecluttered&&this.map.getDeclutter()&&this.map.getDeclutter().getDeclutterMode()==1){
this.setVisible(false);
}
var mqe=new MQA.Event("MQA.Poi.infoWindowClose");
mqe.domEvent=e;
MQA.EventManager.trigger(this,"infowindowclose",mqe);
};
this.onRolloverOpen=function(e){
this.shape.style.zIndex=115;
MQA.EventManager.trigger(this,"rolloveropen",e);
};
this.onRolloverClose=function(e){
this.shape.style.zIndex=90;
MQA.EventManager.trigger(this,"rolloverclose",e);
};
this.onRemoved=function(e){
MQA.EventManager.trigger(this,"removed",e);
};
this._setZIndex=function(i){
this.shape.style.zIndex=i;
};
this._createLabel=function(){
var _46=document.createElement("div");
_46.id="poi.label.div";
_46.style.display=(this.labelVisible?"block":"none");
_46.style.position="absolute";
_46.className=this.labelClass;
var _47=document.createTextNode(this.labelText);
_46.appendChild(_47);
return _46;
};
this._setLabelText=function(){
if(MQA.Util._trim(this.labelText)==""){
if(this.shape&&this._label){
this.shape.removeChild(this.shape.lastChild);
this._label=false;
}else{
if(!this.shape&&this._label){
this._label=false;
}
}
}else{
if(this.shape&&this._label){
this.shape.removeChild(this.shape.lastChild);
var _48=this._createLabel();
this.shape.appendChild(_48);
this._label=true;
this._centerLabel();
}else{
if(this.shape&&!this._label){
var _48=this._createLabel();
if(this.shape){
this.shape.appendChild(_48);
this._label=true;
this._centerLabel();
}
}
}
}
};
this._centerLabel=function(){
if(this._label&&this.labelVisible){
var _49=this.shape.childNodes;
if(this.mqrw==null&&this.mqiw==null){
var _4a=1;
}else{
if(this.mqrw!==null&&this.mqiw!==null){
var _4a=3;
}else{
var _4a=2;
}
}
_49[_49.length-_4a].style.width=_49[_49.length-_4a].offsetWidth+"px";
var _4b=parseInt(_49[_49.length-_4a].style.width);
var _4c=_49[0].width;
_49[_49.length-_4a].style.marginLeft=-((_4b-_4c)/2)+"px";
}
};
this._getCurrentInfoWindowOffset=function(){
if(this.HTMLContent){
return this.HTMLInfoWindowOffset;
}else{
if(!this.altStateFlag&&!this.isDecluttered){
return this.infoWindowOffset;
}else{
if(this.altStateFlag){
return (this.altInfoWindowOffset?this.altInfoWindowOffset:this.infoWindowOffset);
}else{
return (this.declutterInfoWindowOffset?this.declutterInfoWindowOffset:this.infoWindowOffset);
}
}
}
};
this.redraw=function(){
this.draw();
};
this.showRolloverWindow=function(){
var _4d=this._getCurrentInfoWindowOffset();
if(this.mqrw==null){
this.mqrw=this.map.getRolloverWindow();
}
if(this._isRolloverShowable()){
this.shape.appendChild(this.mqrw.minipopup);
var _4e=document.createElement("div");
_4e.innerHTML="<div>"+this.infoTitleHTML+"</div>";
this.mqrw.modify(this.map.getLLToXY(this.latLng),_4e,_4d,this);
this.mqrw.setOpenerAndShow(this);
this.onRolloverOpen(new MQA.Event("MQA.Poi.rolloverOpen"));
}
};
this.showInfoWindow=function(){
var _4f=this._getCurrentInfoWindowOffset();
if(this.infoContentHTML!=null){
if(this.mqiw==null){
this.mqiw=this.map.getInfoWindow();
}
if(this._isRolloverShowable()){
this.mqrw.hide();
}
var _50=this.mqiw.getMaxWidth();
var _51=this.mqiw.getTitleBackgroundColor();
if(this.titleBackgroundColor){
this.mqiw.setTitleBackgroundColor(this.titleBackgroundColor);
}
if(this.maxInfoWindowWidth){
this.mqiw.setMaxWidth(this.maxInfoWindowWidth);
}
this.mqiw.isAttachedToPoi=true;
this.shape.appendChild(this.mqiw.popup);
var _52=document.createElement("div");
var _53=(this.infoWindowTitleText?this.infoWindowTitleText:this.infoTitleHTML);
_52.innerHTML="<div>"+_53+"</div>";
var _54=document.createElement("div");
_54.innerHTML="<div>"+this.infoContentHTML+"</div>";
this.mqiw.modify(this.map.getLLToXY(this.latLng),_52,_54,_4f);
this.mqiw.setOpenerAndShow(this);
this.showingInfo=true;
this.onInfoWindowOpen(new MQA.Event("MQA.Poi.infoWindowOpen"));
this.mqiw.setMaxWidth(_50);
this.mqiw.setTitleBackgroundColor(_51);
}
};
this._setInfoTitleHTML=function(_55){
this.infoTitleHTML=_55;
};
this._setInfoContentHTML=function(_56){
if(_56==undefined){
return;
}
if(_56!=""){
this.infoContentExists=true;
}
this.infoContentHTML=_56;
};
this._isRolloverShowable=function(){
return this.rolloverEnabled&&this.map.getRolloversEnabled()&&(this.infoTitleHTML!=null)&&!this.showingInfo;
};
this._getDraggable=function(){
if(this.map){
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
return true;
}
}
}
return this.draggable;
};
this._getLeaderLineColor=function(){
if(this.leaderLineColor){
return this.leaderLineColor;
}else{
if(this.map.getDeclutter()){
return this.map.getDeclutter().leaderLineColor;
}else{
return "#000000";
}
}
};
this._getLeaderLineDotImage=function(){
if(this.leaderLineDotImage){
return this.leaderLineDotImage;
}else{
if(this.map&&this.map.getDeclutter()){
return this.map.getDeclutter().leaderLineDotImage;
}else{
return null;
}
}
};
this._setLeaderLineColor=function(c){
if(!this.map){
return;
}
if(this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
c=MQA.Graphics.normalizeColor(c).hex;
switch(MQA.Graphics.drawMethod){
case "svg":
this.leaderLine.setAttribute("stroke",c);
if(this.map.getDeclutter().getLeaderLineDotMode()!=2){
this.leaderLineDot.setAttribute("stroke",c);
this.leaderLineDot.setAttribute("fill",c);
}
break;
case "vml":
this.leaderLine.stroke.color=c;
this.leaderLine.stroke.opacity=1;
this.leaderLine.fill.color=c;
this.leaderLineDot.stroke.color=c;
this.leaderLineDot.stroke.opacity=1;
this.leaderLineDot.fill.color=c;
break;
case "canvas":
this.map.getDeclutter().redrawLeaderLines();
break;
}
}
}
};
this._setLeaderLineDotImage=function(_58){
if(this.map&&this.map.getDeclutter()){
if(this.map.getDeclutter().getDeclutterMode()==2){
this.map.getDeclutter().leaderLineDispose(this);
this.map.getDeclutter().drawLeaderLine(this);
if(MQA.Graphics.drawMethod=="canvas"){
this.map.getDeclutter().redrawLeaderLines();
}
}
}
};
this._getCurrentInfo=function(){
var _59,_5a,_5b,_5c;
if(this.HTMLContent){
_5a=this.getValue("HTMLOffset");
_59=null;
_5b=null;
_5c=null;
}else{
if(!this.altStateFlag&&!this.isDecluttered){
_59=this.getValue("icon");
_5a=this.getValue("iconOffset");
_5b=this.getValue("shadow");
_5c=this.getValue("shadowOffset");
}else{
if(this.altStateFlag){
_59=this.getValue("altIcon");
_5a=this.getValue("altIconOffset");
_5b=this.getValue("altShadow");
_5c=this.getValue("altShadowOffset");
}else{
_59=this.getValue("declutterIcon");
_5a=this.getValue("declutterIconOffset");
_5b=this.getValue("declutterShadow");
_5c=this.getValue("declutterShadowOffset");
}
}
}
return {icon:_59,offset:_5a,shadow:_5b,shadowOffset:_5c};
};
this.isOnMap=function(){
return (this.map!=null);
};
this._isMouseOnPoi=function(e){
var _5e=MQA.Util.getParentOffset(this.map.parent);
var cx=e.clientX-_5e.x;
var cy=e.clientY-_5e.y;
var _61=new MQA.Point(this.shape.offsetWidth,this.shape.offsetHeight);
var _62=this.map.getDragOffset();
var _63=MQA.Util.getWindowScrollXY();
var _64=cx+_63.x;
var _65=cy+_63.y;
var _66=parseInt(this.shape.style.left)+_62.x;
var _67=parseInt(this.shape.style.top)+_62.y;
var _68=(_65>=_67)&&(_65<=(_67+parseInt(_61.y)));
_68=_68&&(_64>=_66)&&_64<=(_66+parseInt(_61.x));
return _68;
};
};
MQA.Poi.prototype.setLabel=function(t){
this.setValue("labelText",t);
};
MQA.Poi.prototype.getLabel=function(){
return this.getValue("labelText");
};
MQA.Poi.prototype.setAltIcon=function(t){
this.setValue("altIcon",t);
};
MQA.Poi.prototype.getAltIcon=function(){
return this.getValue("altIcon");
};
MQA.Poi.prototype.setAltStateFlag=function(t){
this.setValue("altStateFlag",t);
};
MQA.Poi.prototype.getAltStateFlag=function(){
return this.getValue("altStateFlag");
};
MQA.Poi.prototype.setDraggable=function(t){
this.setValue("draggable",t);
};
MQA.Poi.prototype.getDraggable=function(){
return this.getValue("draggable");
};
MQA.Poi.prototype.setIcon=function(t){
this.setValue("icon",t);
};
MQA.Poi.prototype.getIcon=function(){
return this.getValue("icon");
};
MQA.Poi.prototype.setIconVisible=function(t){
this.setValue("visible",t);
};
MQA.Poi.prototype.getIconVisible=function(){
return this.getValue("visible");
};
MQA.Poi.prototype.setInfoContentHTML=function(t){
this.setValue("infoContentHTML",t);
};
MQA.Poi.prototype.setInfoTitleHTML=function(t){
this.setValue("infoTitleHTML",t);
};
MQA.Poi.prototype.setKey=function(t){
this.setValue("key",t);
};
MQA.Poi.prototype.getKey=function(){
return this.getValue("key");
};
MQA.Poi.prototype.setIcon=function(t){
this.setValue("icon",t);
};
MQA.Poi.prototype.getIcon=function(){
return this.getValue("icon");
};
MQA.Poi.prototype.setLabelVisible=function(t){
this.setValue("labelVisible",t);
};
MQA.Poi.prototype.isLabelVisible=function(){
return this.getValue("labelVisible");
};
MQA.Poi.prototype.setLatLng=function(t){
this.setValue("latLng",t);
};
MQA.Poi.prototype.getLatLng=function(){
return this.getValue("latLng");
};
MQA.Poi.prototype.setLeaderLineColor=function(t){
this.setValue("leaderLineColor",t);
};
MQA.Poi.prototype.getLeaderLineColor=function(){
return this.getValue("leaderLineColor");
};
MQA.Poi.prototype.setLeaderLineDotImage=function(t){
this.setValue("leaderLineDotImage",t);
};
MQA.Poi.prototype.getLeaderLineDotImage=function(){
return this.getValue("leaderLineDotImage");
};
MQA.Poi.prototype.setRolloverDrag=function(t){
this.setValue("keepRolloverOnDrag",t);
};
MQA.Poi.prototype.getRolloverDrag=function(){
return this.getValue("keepRolloverOnDrag");
};
MQA.Poi.prototype.setRolloverEnabled=function(t){
this.setValue("rolloverEnabled",t);
};
MQA.Poi.prototype.isRolloverEnabled=function(){
return this.getValue("rolloverEnabled");
};
MQA.Poi.prototype.setSnapback=function(t){
this.setValue("snapback",t);
};
MQA.Poi.prototype.getSnapback=function(){
return this.getValue("snapback");
};
MQA.Poi.prototype.setVisible=function(t){
this.setValue("visible",t);
};
MQA.Poi.prototype.isVisible=function(){
return this.getValue("visible");
};

MQA.Declutter=function(_1){
this.map=_1;
this.mode=0;
this.declutterCleared=true;
this.declutterIcon=null;
this.declutterAltIcon=null;
this.declutterOverIcon=null;
this.declutterOverAltIcon=null;
this.dcCollection=null;
this.pnCollection=null;
this.nextPageIcon=null;
this.prevPageIcon=null;
this.pageBarIcon=null;
this.pageMarkIcon=null;
this.stackHeight=1;
this.stackWidth=3;
this.currentPage=1;
this.keepRolloversOnDrag=true;
this.leaderLineColor="#000000";
this.leaderLineDotMode=1;
this.leaderLineDotImage=null;
this.poiCollection=null;
this.cpCollection=null;
};
MQA.Declutter.prototype.setDeclutterMode=function(_2){
if(_2!=0&&this.map.batchCount==0){
if(this.mode!=0&&!this.declutterCleared){
this.doDeclutter(0);
}
if(!this.declutterIcon){
this.setDeclutterIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/declut_star.png",29,29);
}
if(!this.declutterOverIcon){
this.setDeclutterOverIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/declut_star_over.png",29,29);
}
if(!this.nextPageIcon){
this.setNextPageIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/page_right.png",29,19);
}
if(!this.prevPageIcon){
this.setPrevPageIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/page_left.png",29,19);
}
if(!this.pageBarIcon){
this.pageBarIcon=new MQA.DeclutterIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/page_bar.png",29,19);
}
if(!this.pageMarkIcon){
this.pageMarkIcon=new MQA.DeclutterIcon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/page_mark.png",7,19);
}
this.dcCollection=new Array;
this.pnCollection=new Array;
this.cpCollection=new Array;
if(this.map){
this.map.getInfoWindow().hide();
this.doDeclutter(_2);
}
}else{
if(!this.declutterCleared){
this.doDeclutter(0);
}
}
this.mode=_2;
};
MQA.Declutter.prototype.getDeclutterMode=function(){
return this.mode;
};
MQA.Declutter.prototype.setDeclutterIcon=function(_3,_4,_5){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.declutterIcon=new MQA.DeclutterIcon(_3,_4,_5);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.setDeclutterOverIcon=function(_7,_8,_9){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.declutterOverIcon=new MQA.DeclutterIcon(_7,_8,_9);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getDeclutterIcon=function(){
return this.declutterIcon;
};
MQA.Declutter.prototype.setNextPageIcon=function(_b,_c,_d){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.nextPageIcon=new MQA.DeclutterIcon(_b,_c,_d);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getNextPageIcon=function(){
return this.nextPageIcon;
};
MQA.Declutter.prototype.setPrevPageIcon=function(_f,_10,_11){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.prevPageIcon=new MQA.DeclutterIcon(_f,_10,_11);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getPrevPageIcon=function(){
return this.prevPageIcon;
};
MQA.Declutter.prototype.setStackHeight=function(n){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.stackHeight=(n<1?1:n);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getStackHeight=function(){
return this.stackHeight;
};
MQA.Declutter.prototype.setStackWidth=function(n){
var m=this.getDeclutterMode();
if(m){
this.setDeclutterMode(0);
}
this.stackWidth=(n<2?2:n);
if(m){
this.setDeclutterMode(m);
}
};
MQA.Declutter.prototype.getStackWidth=function(){
return this.stackWidth;
};
MQA.Declutter.prototype.setRolloverDrag=function(b){
this.keepRolloversOnDrag=b;
};
MQA.Declutter.prototype.getRolloverDrag=function(){
return this.keepRolloversOnDrag;
};
MQA.Declutter.prototype.setLeaderLineColor=function(c){
this.leaderLineColor=c;
if(this.getDeclutterMode()==2){
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.getLeaderLineColor=function(){
return this.leaderLineColor;
};
MQA.Declutter.prototype.setLeaderLineDotMode=function(m){
this.leaderLineDotMode=m;
if(this.getDeclutterMode()==2){
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.getLeaderLineDotMode=function(){
return this.leaderLineDotMode;
};
MQA.Declutter.prototype.setLeaderLineDotImage=function(url,_1b,_1c){
this.leaderLineDotImage=new MQA.Icon(url,_1b,_1c);
if(this.getDeclutterMode()==2){
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.getLeaderLineDotImage=function(){
return this.leaderLineDotImage;
};
MQA.Declutter.prototype.doDeclutter=function(_1d){
var i,j;
var x=100;
var y=50;
var _22=this.stackHeight*this.stackWidth;
var _23=1;
var _24=false;
var _25;
var _26;
var _27;
var _28;
var _29=1;
var _2a=true;
_1d=parseInt(_1d);
switch(_1d){
case 0:
this.declutterCleared=true;
if(this.mode==1){
for(var i=0,x=this.dcCollection.length;i<x;i++){
for(var j=0,y=this.dcCollection[i].length;j<y;j++){
this.dcCollection[i][j].poi.setValue("visible",true);
this.dcCollection[i][j].poi.setValue("isDecluttered",false);
this.dcCollection[i][j].dispose();
}
this.dcCollection[i]=null;
}
for(var i=0,x=this.pnCollection.length;i<x;i++){
if(this.pnCollection[i]!=null){
this.pnCollection[i][0].remove();
this.pnCollection[i][1].remove();
this.pnCollection[i][2].remove();
this.pnCollection[i][0]=null;
this.pnCollection[i][1]=null;
this.pnCollection[i][2]=null;
}
}
}else{
if(this.mode==2){
this.removeLeaderLines();
var _2b=this.getDeclutteredPois();
for(var i=0,x=_2b.getSize();i<x;i++){
_2b.getAt(i).dragLeft=0;
_2b.getAt(i).dragTop=0;
_2b.getAt(i).setValue("isDecluttered",false);
}
}
}
break;
case 1:
this.declutterCleared=false;
var _2c,_2d;
var _2e,_2f;
var _30;
var _31;
var b;
var _33=this.getDeclutterablePois();
var _34=new Array;
var _35=new Array;
var _36=0;
var y=_33.getSize();
for(var a=0,x=y;a<x;a++){
var _38=_33.getAt(a);
_34[a]=new Array(_33.getAt(a).getValue("latLng").getLatitude(),_33.getAt(a).getValue("latLng").getLongitude(),a);
}
_34.sort(this.sortPoisRL);
for(var a=0,e=_34.length;a<e;a++){
_2c=_33.getAt(_34[a][2]).getValue("icon").width;
_2d=_33.getAt(_34[a][2]).getValue("icon").height;
_2e=this.map.getLLToXY(new MQA.PointLL(_34[a][0],_34[a][1]));
_2e.x=parseInt(_33.getAt(_34[a][2]).shape.style.left);
_2e.y=parseInt(_33.getAt(_34[a][2]).shape.style.top);
_2f=new MQA.PointXY(_2e.x+_2c,_2e.y+_2d);
if(this.declutterIcon.height>_2d){
_2e.y-=(this.declutterIcon.height-_2d);
}
_2e.y-=(this.nextPageIcon.height+_29);
if(this.declutterIcon.width>_2c){
_2f.x-=(this.declutterIcon.width-_2c);
}
_30=new MQA.RectXY(_2e,_2f);
_31=false;
for(b=0;!_31&&b<_35.length;b++){
_31=this.isIntersected(_30,_35[b][0]);
}
if(_31){
b=b-1;
_35[b][1][_35[b][1].length]=a;
var _3a=_35[b][1].length;
var _3b=parseInt((_3a-1)%_22);
var _3c=parseInt(_3b/this.stackWidth);
var _3d=parseInt(_3b%this.stackWidth);
_25=_35[b][3].x-(_3d+1)*(this.declutterIcon.width+_29);
_26=_35[b][3].y-((_3c+1)*(this.declutterIcon.height+_29));
_2a=(_3a<=_22);
if(_3a<=this.stackWidth){
_35[b][0].ul.x-=(this.declutterIcon.width+_29);
}
if(_3d==0&&_3c>0&&_3c<this.stackHeight){
_35[b][0].ul.y-=(this.declutterIcon.height+_29)+(this.pageMarkIcon.height+_29);
}
this.addDeclutterPoi(_25,_26,_33.getAt(_34[a][2]),_2a,b);
if(_3a>_22&&this.pnCollection[b]==null){
this.pnCollection[b]=new Array();
var _3e=_35[b][3].y-(this.stackHeight*(this.declutterIcon.height+_29)+(Math.max(this.nextPageIcon.height,this.pageBarIcon.height)+_29));
this.pnCollection[b][0]=new MQA.PrevNextIcon(this.prevPageIcon,_35[b][3].x-(this.nextPageIcon.width+this.pageBarIcon.width+this.prevPageIcon.width+(3*_29)),_3e,this.map,false,-1,b);
this.pnCollection[b][1]=new MQA.PrevNextIcon(this.nextPageIcon,_35[b][3].x-(this.nextPageIcon.width+_29),_3e,this.map,true,1,b);
this.pnCollection[b][2]=new MQA.PageMarkIcon(this.pageBarIcon,this.pageMarkIcon,_35[b][3].x-(this.nextPageIcon.width+this.pageBarIcon.width+(2*_29)),_3e,this.map,b);
}
}else{
if(this.declutterIcon.height>_2d){
_2e.y-=parseInt((this.declutterIcon.height-_2d)/2);
}
_2e.y+=(this.declutterIcon.height+_29);
var _3f=new Array();
_3f[0]=_30;
_3f[1]=new Array();
_3f[2]=a;
_3f[3]=_2e;
_35[_35.length]=_3f;
this.pnCollection[this.pnCollection.length]=null;
this.dcCollection[this.dcCollection.length]=new Array();
this.cpCollection[this.cpCollection.length]=1;
}
}
break;
case 2:
this.declutterCleared=false;
this.getPoiDims();
var _40=this.createDeclutterGrps();
this.doDeclutterM2(_40);
break;
}
};
MQA.Declutter.prototype.resetIsDeclutteredFlag=function(){
var _41=this.map.getShapeCollections(true);
for(var i=0;i<_41.length;i++){
for(var x=0;x<_41[i].getSize();x++){
if(_41[i].getAt(x) instanceof MQA.Poi){
_41[i].getAt(x).isDecluttered=false;
}
}
}
};
MQA.Declutter.prototype.getDeclutterablePois=function(){
var _44=new MQA.ShapeCollection();
var _45=this.map.getShapeCollections(true);
for(var i=0;i<_45.length;i++){
var _47=this.map.getZoomLevel();
var _48=_45[i].getMinZoomLevel();
var _49=_45[i].getMaxZoomLevel();
if(_47<=_49&&_47>=_48){
if(_45[i].getDeclutter()){
for(var x=0;x<_45[i].getSize();x++){
if(_45[i].getAt(x) instanceof MQA.Poi){
if(!_44.contains(_45[i].getAt(x))){
_44.add(_45[i].getAt(x));
}
}
}
}
}
}
return _44;
};
MQA.Declutter.prototype.getDeclutteredPois=function(){
var _4b=new MQA.ShapeCollection();
var _4c=this.map.getShapeCollections(true);
for(var i=0;i<_4c.length;i++){
for(var x=0;x<_4c[i].getSize();x++){
if(_4c[i].getAt(x) instanceof MQA.Poi&&_4c[i].getAt(x).isDecluttered){
if(!_4b.contains(_4c[i].getAt(x))){
_4b.add(_4c[i].getAt(x));
}
}
}
}
return _4b;
};
MQA.Declutter.prototype.getPoiDims=function(){
var _4f=this.getDeclutterablePois();
var _50=_4f.getSize();
this.poiCollection={length:_50};
var _51=new Array;
for(var i=0;i<_50;i++){
_51[i]=new Array(_4f.getAt(i).getValue("latLng").getLatitude(),_4f.getAt(i).getValue("latLng").getLongitude(),i);
}
_51.sort(this.sortPois);
for(var i=0,j=_51.length;i<j;i++){
tmpHW=_4f.getAt(_51[i][2]).getValue("icon");
tmpXY=this.map.getLLToXY(_4f.getAt(_51[i][2]).getValue("latLng"));
tmpXY.x-=Math.ceil(tmpHW.width/2);
tmpXY.y-=Math.ceil(tmpHW.height/2);
this.poiCollection[i]={ix:tmpXY.x,iy:tmpXY.y,x:tmpXY.x,y:tmpXY.y,h:tmpHW.height,w:tmpHW.width,indx:_51[i][2]};
}
};
MQA.Declutter.prototype.createDeclutterGrps=function(){
var _54=new Array();
var _55=new Array;
var _56=0;
var _57;
for(var i=0,k=this.poiCollection.length;i<k;i++){
if(MQA.Util.indexOf(_54,i)>=0){
continue;
}
_57=false;
for(var j=i+1;j<k;j++){
if(MQA.Util.indexOf(_54,j)>=0){
continue;
}
if(this.isOverlapped(this.poiCollection[i],this.poiCollection[j])){
if(!_57){
_55[_56]=new Array();
_55[_56].push(i);
_54.push(i);
_57=true;
}
_55[_56].push(j);
_54.push(j);
}
}
if(_55[_56]&&_55[_56].length>0){
_56++;
}
}
return _55;
};
MQA.Declutter.prototype.doDeclutterM2=function(_5b){
var _5c={x:0,y:0,h:0,w:0};
var PI=3.14;
var _5e,_5f;
var nx,ny;
var n,_63;
var _64;
var _65;
var _66;
var _67;
var _68=false;
var _69;
if(_5b.length==1&&_5b[0].length==this.poiCollection.length){
_68=true;
_5e=360/_5b[0].length;
_5f=1350/_5e;
_5f=(_5f<75)?75:_5f;
}else{
_5e=10;
_5f=75;
}
var _6a;
var _6b,_6c;
var _6d=this.map.getDragOffset();
for(var i=0,p=_5b.length;i<p;i++){
n=-180;
_63=this.getDeclutCenterPt(_5b[i]);
_64=1;
_6a=_5f;
for(var k=0,q=_5b[i].length;k<q;k++){
_65=this.poiCollection[_5b[i][k]];
_6b=Math.ceil(_65.w/2);
_6c=Math.ceil(_65.h/2);
for(var _72=n;;_72+=_5e){
if(_72>=180){
++_64;
_72-=360;
if(_64>2){
_6a+=30;
}
}
if(_64>4){
break;
}
nx=Math.round(_6a*Math.cos(PI*_72/180));
ny=Math.round(_6a*Math.sin(PI*_72/180));
_5c.x=_63.x+nx-_6b;
_5c.y=_63.y+ny-_6c;
_5c.h=_65.h;
_5c.w=_65.w;
if(_63.x>0&&_63.y>0&&_63.x<this.map.width&&_63.y<this.map.height){
if(_5c.x<=_5c.w||_5c.y<=_5c.h||_5c.x+_5c.w>=this.map.width||_5c.y+_5c.h>=this.map.height){
continue;
}
}
_66=false;
for(var m=0,r=this.poiCollection.length;m<r;m++){
_69=MQA.Util.indexOf(_5b[i],m);
if((this.poiCollection[m].ix!=this.poiCollection[m].x)||(this.poiCollection[m].iy!=this.poiCollection[m].y)){
if(this.checkLLIntersection(this.poiCollection[m].ix+_6b,this.poiCollection[m].iy+_6c,this.poiCollection[m].x+_6b,this.poiCollection[m].y+_6c,_65.ix+_6b,_65.iy+_6c,_5c.x+_6b,_5c.y+_6c)){
_66=true;
break;
}
}
if(_69<0){
if((this.isOverlapped(_5c,this.poiCollection[m]))||((_64<2)&&this.checkLPIntersection((_65.ix+_6b),(_65.iy+_6c),_5c.x+_6b,_5c.y+_6c,this.poiCollection[m]))){
_66=true;
break;
}else{
if((_64<2)&&((this.poiCollection[m].ix!=this.poiCollection[m].x)||(this.poiCollection[m].iy!=this.poiCollection[m].y))){
if(this.checkLPIntersection(this.poiCollection[m].ix+(this.poiCollection[m].w/2),this.poiCollection[m].iy+(this.poiCollection[m].h/2),this.poiCollection[m].x+_6b,this.poiCollection[m].y+_6c,_5c)){
_66=true;
break;
}
}
}
}else{
if((_69>=0)&&(_69<k)&&(this.isOverlapped(_5c,this.poiCollection[m]))){
_66=true;
break;
}
}
}
if(_66){
continue;
}
n=_72+_5e;
_67=this.getDeclutterablePois().getAt(_65.indx);
_67.setValue("isDecluttered",true);
_67.shape.style.left=_5c.x-_6d.x+"px";
_67.shape.style.top=_5c.y-_6d.y+"px";
this.drawLeaderLine(_67);
theLatLngXY=this.map.llToPix(_67.getValue("latLng"));
_67.dragLeft=theLatLngXY.x-_5c.x;
_67.dragTop=theLatLngXY.y-_5c.y;
_65.x=_5c.x;
_65.y=_5c.y;
break;
}
}
}
};
MQA.Declutter.prototype.checkLPIntersection=function(x1,y1,x2,y2,poi){
var m1=(x2-x1==0)?(y2-y1)/1e-8:(y2-y1)/(x2-x1);
var a1=y1-m1*x1;
var hm2=0;
var vm2=poi.h/1e-8;
var u1,v1,u2,v2;
var a2,xi,yi;
for(var i=1;i<=4;i++){
switch(i){
case 1:
u1=poi.x;
v1=poi.y;
u2=poi.x+poi.w;
v2=poi.y;
break;
case 2:
u1=poi.x+poi.w;
v1=poi.y;
u2=poi.x+poi.w;
v2=poi.y+poi.h;
break;
case 3:
u1=poi.x;
v1=poi.y+poi.h;
u2=poi.x+poi.w;
v2=poi.y+poi.h;
break;
case 4:
u1=poi.x;
v1=poi.y;
u2=poi.x;
v2=poi.y+poi.h;
break;
}
if(i%2==1){
a2=v1;
xi=Math.round(0-(a1-a2)/m1);
yi=a2;
}else{
a2=v1-vm2*u1;
xi=Math.round(0-(a1-a2)/(m1-vm2));
yi=(Math.abs(m1)<Math.abs(vm2))?Math.round(a1+m1*xi):Math.round(a2+vm2*xi);
}
if(((x1<=xi&&x2>=xi)||(x1>=xi&&x2<=xi))&&((u1<=xi&&u2>=xi)||(u1>=xi&&u2<=xi))&&((y1<=yi&&y2>=yi)||(y1>=yi&&y2<=yi))&&((v1<=yi&&v2>=yi)||(v1>=yi&&v2<=yi))){
return (true);
}
}
return (false);
};
MQA.Declutter.prototype.checkLLIntersection=function(x1,y1,x2,y2,u1,v1,u2,v2){
var m1=(x2-x1==0)?(y2-y1)/1e-8:(y2-y1)/(x2-x1);
var a1=y1-m1*x1;
var m2=(u2-u1==0)?(v2-v1)/1e-8:(v2-v1)/(u2-u1);
var a2=v1-m2*u1;
var xi,yi;
xi=Math.round(0-(a1-a2)/(m1-m2));
yi=(Math.abs(m1)<Math.abs(m2))?Math.round(a1+m1*xi):Math.round(a2+m2*xi);
if(((x1<=xi&&x2>=xi)||(x1>=xi&&x2<=xi))&&((u1<=xi&&u2>=xi)||(u1>=xi&&u2<=xi))&&((y1<=yi&&y2>=yi)||(y1>=yi&&y2<=yi))&&((v1<=yi&&v2>=yi)||(v1>=yi&&v2<=yi))){
var _94=3;
if(((Math.abs(x1-xi)<=_94)&&(Math.abs(y1-yi)<=_94))||((Math.abs(u1-xi)<=_94)&&(Math.abs(v1-yi)<=_94))||((Math.abs(x2-xi)<=_94)&&(Math.abs(y2-yi)<=_94))||((Math.abs(u2-xi)<=_94)&&(Math.abs(v2-yi)<=_94))){
return (false);
}
return (true);
}
return (false);
};
MQA.Declutter.prototype.getDeclutCenterPt=function(_95){
var _96=0;
var _97=0;
var poi;
var _99=_95.length;
for(var i=0;i<_99;i++){
poi=this.poiCollection[_95[i]];
_96+=poi.ix+poi.w/2;
_97+=poi.iy+poi.h/2;
}
return (new MQA.PointXY(Math.round(_96/_99),Math.round(_97/_99)));
};
MQA.Declutter.prototype.isOverlapped=function(_9b,_9c){
var x1,x2,y1,y2,w1,w2,h1,h2;
x1=_9b.x;
y1=_9b.y;
h1=_9b.h;
w1=_9b.w;
x2=_9c.x;
y2=_9c.y;
h2=_9c.h;
w2=_9c.w;
if((((x1<=x2)&&((x1+w1)>=x2))&&(((y1<=y2)&&((y1+h1)>=y2))||((y1>=y2)&&((y2+h2)>=y1))))||(((x1>=x2)&&((x2+w2)>=x1))&&(((y1>=y2)&&((y2+h2)>=y1))||((y1<=y2)&&((y1+h1)>=y2))))){
return (true);
}
return (false);
};
MQA.Declutter.prototype.sortPois=function(a,b){
return (a[1]-b[1]);
};
MQA.Declutter.prototype.sortPoisRL=function(a,b){
return (b[1]-a[1]);
};
MQA.Declutter.prototype.isIntersected=function(_a9,_aa){
var _ab=(_a9.lr.x>_aa.ul.x)&&(_a9.ul.x<_aa.lr.x)&&(_a9.lr.y>_aa.ul.y)&&(_a9.ul.y<_aa.lr.y);
return _ab;
};
MQA.Declutter.prototype.setMap=function(map){
this.map=map;
};
MQA.Declutter.prototype.addDeclutterPoi=function(x,y,poi,_b0,_b1){
var _b2=new MQA.DeclutterPoi(this.map,poi,_b0);
this.dcCollection[_b1].push(_b2);
poi.isDecluttered=true;
var ll=this.map.pixToLL(new MQA.Point(x,y));
this.map._addPoi(ll,new MQA.PointXY(0,0),_b2.div);
};
MQA.Declutter.prototype.turnPage=function(_b4,_b5){
var i;
var _b7=this.stackHeight*this.stackWidth;
var _b8=this.dcCollection[_b5].length;
if(this.cpCollection[_b5]==1&&_b4==-1){
return;
}
if(((this.cpCollection[_b5]*_b7)>=_b8)&&_b4==1){
return;
}
this.cpCollection[_b5]=this.cpCollection[_b5]+_b4;
for(i=0;i<_b8;i++){
this.dcCollection[_b5][i].setVisible(false);
}
var _b9=(this.cpCollection[_b5]*_b7);
if(_b9>_b8){
_b9=_b8;
}
var _ba=(this.cpCollection[_b5]*_b7)-_b7;
for(i=_ba;i<_b9;i++){
this.dcCollection[_b5][i].setVisible(true);
}
if(_ba>0){
this.pnCollection[_b5][0].setVisible(true);
}else{
this.pnCollection[_b5][0].setVisible(false);
}
if(_b9<_b8){
this.pnCollection[_b5][1].setVisible(true);
}else{
this.pnCollection[_b5][1].setVisible(false);
}
var _bb=this.cpCollection[_b5]-1;
var _bc=parseInt(Math.ceil(_b8/_b7))-1;
var _bd=this.pageBarIcon.width-6;
this.pnCollection[_b5][2].div.mar.style.left=parseInt(_bd*(_bb/_bc))+"px";
};
MQA.Declutter.prototype.adjustLeaderLineSurface=function(){
var _be=false;
if(this.map.poisurface){
if(this.map.getDragOffset().x!=this.map.poiLineOffsetX||this.map.getDragOffset().y!=this.map.poiLineOffsetY){
this.map.poiLineOffsetX=this.map.getDragOffset().x;
this.map.poiLineOffsetY=this.map.getDragOffset().y;
if(this.map.poilinediv){
this.map.poilinediv.style.left=-(MQA.SURFACE_OFFSET+this.map.poiLineOffsetX)+"px";
this.map.poilinediv.style.top=-(MQA.SURFACE_OFFSET+this.map.poiLineOffsetY)+"px";
}
_be=true;
}
}
if(this.map.dcCanvasDiv){
if(this.map.getDragOffset().x!=this.map.canvasOffsetX||this.map.getDragOffset().y!=this.map.canvasOffsetY){
this.map.canvasOffsetX=this.map.getDragOffset().x;
this.map.canvasOffsetY=this.map.getDragOffset().y;
if(this.map.dcCanvasDiv){
this.map.dcCanvasDiv.style.left=-(MQA.SURFACE_OFFSET+this.map.canvasOffsetX)+"px";
this.map.dcCanvasDiv.style.top=-(MQA.SURFACE_OFFSET+this.map.canvasOffsetY)+"px";
}
_be=true;
}
}
return _be;
};
MQA.Declutter.prototype.drawLeaderLine=function(poi){
if(poi.shape.style.display=="none"){
return;
}
var xy=new Object;
var _c1=(MQA.browser.name=="safari");
if(!_c1){
if(!this.map.poisurface){
this.map.createPoiDrawingSurface();
}
}else{
if(!this.map.dcCanvasDiv){
this.map.createCanvas();
}
}
if(!_c1){
if(!poi.map.poisurface){
throw ("Leader line drawing surface does not exist.");
}
}else{
if(!this.map.dcCanvasDiv){
throw ("Leaderline drawing canvas does not exist.");
}
}
if(!this.adjustLeaderLineSurface()){
var _c2=this.map.getDragOffset();
var _c3=new Array();
_c3[0]=new Object;
_c3[0]=this.map.llToPix(poi.getValue("latLng"));
_c3[0].x+=(MQA.SURFACE_OFFSET);
_c3[0].y+=(MQA.SURFACE_OFFSET);
_c3[1]=new Object;
var _c4=parseInt(this.map.div1.style.left)+_c2.x;
var _c5=parseInt(this.map.div1.style.top)+_c2.y;
if(poi.getValue("altStateFlag")){
var _c6=poi.getValue("altIconOffset").x;
var _c7=poi.getValue("altIconOffset").y;
}else{
var _c6=poi.getValue("declutterIconOffset").x;
var _c7=poi.getValue("declutterIconOffset").y;
}
_c3[1].x=(parseInt(poi.shape.style.left)+MQA.SURFACE_OFFSET)-_c6+_c4;
_c3[1].y=(parseInt(poi.shape.style.top)+MQA.SURFACE_OFFSET)-_c7+_c5;
cpnts=new Array();
if(MQA.Util.isOverLimit(xy)){
if(!_c1){
var _c8=parseInt(this.map.poilinediv.style.height.substr(0,(this.map.poilinediv.style.height.length)-2));
var _c9=parseInt(this.map.poilinediv.style.width.substr(0,(this.map.poilinediv.style.width.length)-2));
}else{
var _c8=parseInt(this.map.dcCanvasDiv.style.height.substr(0,(this.map.dcCanvasDiv.style.height.length)-2));
var _c9=parseInt(this.map.dcCanvasDiv.style.width.substr(0,(this.map.dcCanvasDiv.style.width.length)-2));
}
cpnts=MQA.Clip(0,_c8,0,_c9,_c3,false);
}else{
cpnts=_c3;
}
var _ca=poi.getValue("leaderLineColor");
if(!_c1){
poi.leaderLine=MQA.Graphics.drawLine(cpnts,_ca,1,2,true,{x:MQA.Graphics.surfaceWidth,y:MQA.Graphics.surfaceHeight});
this.map.poisurface.appendChild(poi.leaderLine);
poi.leaderLine.setAttribute("zIndex",80);
}else{
this.map.dcCanvasContext.strokeStyle=_ca;
this.map.dcCanvasContext.lineWidth=2;
this.map.dcCanvasContext.beginPath();
this.map.dcCanvasContext.moveTo(cpnts[1].x,cpnts[1].y);
this.map.dcCanvasContext.lineTo(cpnts[0].x,cpnts[0].y);
this.map.dcCanvasContext.stroke();
}
var _cb=parseInt(this.getLeaderLineDotMode());
switch(_cb){
case 0:
break;
case 1:
if(!_c1){
var c=new Array({x:cpnts[0].x-3,y:cpnts[0].y-3},{x:cpnts[0].x+3,y:cpnts[0].y+3});
var _cd=this.map.llToPix(poi.getValue("latLng")).x;
var _ce=this.map.llToPix(poi.getValue("latLng")).y;
var _cf=-MQA.SURFACE_OFFSET;
var _d0=-MQA.SURFACE_OFFSET;
if(!((_cd<_cf)||(_cd>_cf+MQA.Graphics.surfaceWidth)||(_ce<_d0)||(_ce>_d0+MQA.Graphics.surfaceHeight))){
poi.leaderLineDot=MQA.Graphics.drawEllipse(c,_ca,1,1,_ca,1,true);
this.map.poisurface.appendChild(poi.leaderLineDot);
poi.leaderLineDot.setAttribute("zIndex",80);
}
}else{
this.map.dcCanvasContext.beginPath();
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,3,0,Math.PI*2,true);
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,2,0,Math.PI*2,true);
this.map.dcCanvasContext.arc(cpnts[0].x,cpnts[0].y,1,0,Math.PI*2,true);
this.map.dcCanvasContext.stroke();
}
break;
case 2:
var _d1=poi.getValue("leaderLineDotImage");
if(_d1){
poi._leaderLineDotIconDiv=document.createElement("div");
poi._leaderLineDotIconDiv.style.position="absolute";
poi._leaderLineDotIconDiv.style.display="block";
poi._leaderLineDotIconDiv.style.height=_d1.height;
poi._leaderLineDotIconDiv.style.width=_d1.width;
poi._leaderLineDotIconDiv.style.MozUserSelect="none";
poi._leaderLineDotIconDiv.unselectable="on";
var _d2=document.createElement("img");
_d2.src=_d1.imageURL;
_d2.unselectable="on";
_d2.style.height=_d1.height;
_d2.style.width=_d1.width;
poi._leaderLineDotIconDiv.appendChild(_d2);
poi.map._addPoi(poi.getValue("latLng"),new MQA.PointXY(-_d1.width/2,-_d1.height/2),poi._leaderLineDotIconDiv);
poi._leaderLineDotIconDiv.style.zIndex=85;
}
break;
default:
break;
}
}else{
this.redrawLeaderLines();
}
};
MQA.Declutter.prototype.redrawLeaderLines=function(){
var _d3=null;
var _d4=(MQA.browser.name=="safari");
if(arguments.length>0){
_d3=arguments[0];
}
if(this.map.dcCanvasContext){
this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));
}
var _d5=this.getDeclutteredPois();
for(var i=0,x=_d5.getSize();i<x;i++){
var _d8=_d5.getAt(i);
if(_d8.getValue("isDecluttered")){
if(!_d4||(x==0)){
this.leaderLineDispose(_d8);
}else{
if(_d4&&(x>0)){
this.leaderLineDispose(_d8,true);
}
}
this.drawLeaderLine(_d8);
}
}
};
MQA.Declutter.prototype.removeLeaderLines=function(){
var _d9=this.getDeclutteredPois();
for(var i=0,x=_d9.getSize();i<x;i++){
var _dc=_d9.getAt(i);
this.leaderLineDispose(_dc);
}
if(MQA.browser.name=="safari"){
if(this.map.dcCanvasContext){
this.map.dcCanvasContext.clearRect(0,0,parseInt(this.map.dcCanvasDiv.style.width),parseInt(this.map.dcCanvasDiv.style.height));
}
}
};
MQA.Declutter.prototype.resetDraggedPois=function(){
var _dd;
var _de=this.getDeclutterablePois();
for(var i=0,j=_de.getSize();i<j;i++){
_dd=_de.getAt(i);
theLatLngXY=this.map.llToPix(_dd.getValue("latLng"));
if(_dd.dragLeft!=null){
_dd.shape.style.left=theLatLngXY.x-_dd.dragLeft+"px";
_dd.shape.style.top=theLatLngXY.y-_dd.dragTop+"px";
}
}
};
MQA.Declutter.prototype.leaderLineDispose=function(poi,_e2){
var _e2=(typeof (_e2)=="undefined"?false:_e2);
if(!poi.map&&!_e2){
return;
}
if(!_e2){
if(!poi.map.dcCanvasContext){
if(poi.leaderLine){
poi.leaderLine.innerHTML=null;
MQA.Graphics.remove(poi.map.poisurface,poi.leaderLine);
MQA.Util._setOuterHTMLToEmptyString(poi.leaderLine);
poi.leaderLine=null;
}
if(poi.leaderLineDot){
poi.leaderLineDot.innerHTML=null;
MQA.Graphics.remove(poi.map.poisurface,poi.leaderLineDot);
MQA.Util._setOuterHTMLToEmptyString(poi.leaderLineDot);
poi.leaderLineDot=null;
}
}else{
poi.map.dcCanvasContext.clearRect(0,0,parseInt(poi.map.dcCanvasDiv.style.width),parseInt(poi.map.dcCanvasDiv.style.height));
}
}
if(poi._leaderLineDotIconDiv){
poi._leaderLineDotIconDiv.style.display="none";
poi._leaderLineDotIconDiv.innerHTML=null;
MQA.Util._deleteDOMObject(poi._leaderLineDotIconDiv);
MQA.Util._setOuterHTMLToEmptyString(poi._leaderLineDotIconDiv);
poi._leaderLineDotIconDiv=null;
}
};
MQA.DeclutterPoi=function(map,poi,_e5){
this.map=map;
this.poi=poi;
this.div=document.createElement("div");
this.div.id="dc_"+poi.getValue("labelText");
this.div.className="pois";
this.div.im=document.createElement("img");
var _e6;
if(poi.getValue("altIcon")!=poi.getValue("icon")){
_e6=new MQA.DeclutterIcon(poi.getValue("altIcon").imageURL,this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_e6=this.map.getDeclutter().getDeclutterIcon();
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.getDeclutter().declutterOverIcon.imageURL)&&MQA.Util._hasPngExtention(_e6.imageURL)){
this.div.im.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_e6.imageURL+"', sizingMethod='image') ";
}else{
this.div.im.src=_e6.imageURL;
}
this.div.im.style.height=_e6.height+"px";
this.div.im.style.width=_e6.width+"px";
this.div.im.style.position="absolute";
if(_e5){
this.div.im.style.display="block";
}else{
this.div.im.style.display="none";
}
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.im);
this.click=MQA._prEvent.EventCallback(poi,"onClick");
this.dblclick=MQA._prEvent.EventCallback(poi,"onDoubleClick");
this.mousedown=MQA._prEvent.EventCallback(poi,"onMouseDown");
this.mouseup=MQA._prEvent.EventCallback(poi,"onMouseUp");
this.mouseover=MQA._prEvent.EventCallback(this,"onMouseOver");
this.mouseout=MQA._prEvent.EventCallback(this,"onMouseOut");
MQA._prEvent.observe(this.div.im,"click",this.click);
MQA._prEvent.observe(this.div.im,"dblclick",this.dblclick);
MQA._prEvent.observe(this.div.im,"mousedown",this.mousedown);
MQA._prEvent.observe(this.div.im,"mouseup",this.mouseup);
MQA._prEvent.observe(this.div.im,"mouseover",this.mouseover);
MQA._prEvent.observe(this.div.im,"mouseout",this.mouseout);
poi.setValue("visible",false);
};
MQA.DeclutterPoi.prototype={dispose:function(){
MQA._prEvent.stopObserving(this.div.im,"click",this.click);
MQA._prEvent.stopObserving(this.div.im,"dblclick",this.dblclick);
MQA._prEvent.stopObserving(this.div.im,"mousedown",this.mousedown);
MQA._prEvent.stopObserving(this.div.im,"mouseup",this.mouseup);
MQA._prEvent.stopObserving(this.div.im,"mouseover",this.mouseover);
MQA._prEvent.stopObserving(this.div.im,"mouseout",this.mouseout);
this.div.im.outerHTML="";
MQA.Util._deleteDOMObject(this.div.im);
this.div.im=null;
this.div.innerHTML=null;
this.div.outerHTML="";
MQA.Util._deleteDOMObject(this.div);
this.div=null;
},onMouseOut:function(e){
if(this.poi.showingInfo!=true){
this.poi.setValue("visible",false);
this.poi.setValue("zIndex",90);
}
this.poi.onMouseOut(e);
var _e8;
if(this.poi.getValue("altIcon")!=this.poi.getValue("icon")){
_e8=new MQA.DeclutterIcon(this.poi.getValue("altIcon").imageURL,this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_e8=this.map.mydeclutter.declutterIcon;
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.mydeclutter.declutterOverIcon.imageURL)&&MQA.Util._hasPngExtention(_e8.imageURL)){
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_e8.imageURL+"', sizingMethod='image') ";
}else{
this.div.im.src=_e8.imageURL;
}
},onMouseOver:function(e){
this.poi.setValue("zIndex",100);
this.poi.setValue("visible",true);
this.poi.onMouseOver(e);
var _ea;
if(this.poi.getValue("altIcon")!=this.poi.getValue("icon")){
_ea=new MQA.DeclutterIcon(this.poi.getValue("altIcon").imageURL,this.map.mydeclutter.declutterIcon.width,this.map.mydeclutter.declutterIcon.height);
}else{
_ea=this.map.mydeclutter.declutterIcon;
}
if((MQA.browser.name=="msie"&&MQA.browser.version<7)&&MQA.Util._hasPngExtention(this.map.mydeclutter.declutterOverIcon.imageURL)&&MQA.Util._hasPngExtention(_ea.imageURL)){
if(this.map.mydeclutter.declutterOverIcon){
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.map.mydeclutter.declutterOverIcon.imageURL+"', sizingMethod='image') ";
}
}else{
if(this.map.mydeclutter.declutterOverIcon){
this.div.im.src=this.map.mydeclutter.declutterOverIcon.imageURL;
}
}
},setVisible:function(v){
this.div.im.style.display=(v)?"block":"none";
}};
MQA.PageMarkIcon=function(bar,_ed,x,y,map,_f1){
this.map=map;
this.index=_f1;
this.div=document.createElement("div");
this.div.className="pois";
this.div.bar=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(bar.imageURL)){
this.div.bar.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.div.bar.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+bar.imageURL+"', sizingMethod='image');";
}else{
this.div.bar.src=bar.imageURL;
}
this.div.bar.style.position="absolute";
this.div.bar.style.display="block";
this.div.bar.style.height=bar.height;
this.div.bar.style.width=bar.width;
this.div.mar=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(_ed.imageURL)){
this.div.mar.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.div.mar.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_ed.imageURL+"', sizingMethod='image');";
}else{
this.div.mar.src=_ed.imageURL;
}
this.div.mar.style.position="absolute";
this.div.mar.style.display="block";
this.div.mar.style.height=_ed.height;
this.div.mar.style.width=_ed.width;
this.div.mar.style.left="0px";
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.bar);
this.div.appendChild(this.div.mar);
var ll=this.map.pixToLL(new MQA.Point(x,y));
this.map._addPoi(ll,new MQA.PointXY(0,0),this.div);
};
MQA.PageMarkIcon.prototype={dispose:function(){
this.div.bar.style.display="block";
this.div.mar.style.display="block";
this.div.removeChild(this.div.bar);
this.div.removeChild(this.div.mar);
this.div.bar=null;
this.div.mar=null;
this.div.innerHTML=null;
this.div.outerHTML="";
MQA.Util._deleteDOMObject(this.div);
this.div=null;
},remove:function(){
this.dispose();
}};
MQA.PrevNextIcon=function(_f3,x,y,map,_f7,_f8,_f9){
this.map=map;
this.increment=_f8;
this.index=_f9;
this.div=document.createElement("div");
this.div.className="pois";
this.div.im=document.createElement("img");
if(MQA.browser.name=="msie"&&MQA.Util._hasPngExtention(_f3.imageURL)){
this.div.im.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.div.im.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_f3.imageURL+"', sizingMethod='image');";
}else{
this.div.im.src=_f3.imageURL;
}
this.div.im.style.position="absolute";
if(_f7){
this.div.im.style.display="block";
}else{
this.div.im.style.display="none";
}
this.div.im.style.height=_f3.height;
this.div.im.style.width=_f3.width;
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.im);
var ll=this.map.pixToLL(new MQA.Point(x,y));
this.map._addPoi(ll,new MQA.PointXY(0,0),this.div);
MQA._prEvent.observe(this.div.im,"click",MQA._prEvent.EventCallback(this,"onClick"));
MQA._prEvent.observe(this.div.im,"dblclick",MQA._prEvent.EventCallback(this,"onDblClick"));
};
MQA.PrevNextIcon.prototype={dispose:function(){
this.div.innerHTML=null;
this.div.outerHTML="";
MQA.Util._deleteDOMObject(this.div);
this.div=null;
},remove:function(){
this.dispose();
},setVisible:function(v){
this.div.im.style.display=(v)?"block":"none";
},onClick:function(e){
this.map.getDeclutter().turnPage(this.increment,this.index);
},onDblClick:function(e){
e.stop;
}};
MQA.DeclutterIcon=function(url,_ff,_100){
this.url=url;
this.imageURL=url;
this.width=_ff;
this.height=_100;
};
MQA.LeaderLineDotImage=function(url,_102,_103){
this.imageURL=url;
this.width=_102;
this.height=_103;
};
MQA.LeaderLineDotIcon=function(_104,map,poi){
this.map=map;
this.div=document.createElement("div");
this.div.im=document.createElement("img");
this.div.im.src=_104.imageURL;
this.div.im.style.height=_104.height;
this.div.im.style.width=_104.width;
this.div.im.style.position="absolute";
this.div.im.style.display="block";
this.div.style.MozUserSelect="none";
this.div.appendChild(this.div.im);
this.map._addPoi(poi.getValue("latLng"),new MQA.PointXY(-_104.width/2,-_104.height/2),this.div);
};

MQA.InfoWindow=function(_1){
this.map=_1;
this.enabled=true;
this.point=null;
this.title=null;
this.content=null;
this.offset=null;
this.maxwidth=this.map.width-50;
this.minwidth=60;
this.maxheight=this.map.height-50;
this.contentwidth=null;
this.titlebackgroundcolor=null;
this.opener=null;
this.infoWindowSrc=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/infopopup.png";
this.isAttachedToPoi=false;
this.popup=document.createElement("div");
this.popup.id="popupcontainer";
this.popup.className="mqpoipopup";
this.popup.currentElement=null;
this.popup.oncontextmenu=function(){
return false;
};
var _2="<div id='poiclose' class='mqpoiclose'><div style='width:650px;height:685px;margin-left:-180px;margin-top:-650px;'></div></div>";
_2+="<div id='popup-topleft' style='position:absolute;overflow:hidden;'><div style='width:650px;height:685px;'></div></div>";
_2+="<div id='popup-topright' style='position:absolute;width:20px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-630px;'></div></div>";
_2+="<div id='popup-bottomleft' style='position:absolute;height:15px;overflow:hidden;'><div style='width:650px;height:685px;margin-top:-630px;'></div></div>";
_2+="<div id='popup-bottomright' style='position:absolute;width:20px;height:15px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-630px;margin-top:-630px;'></div></div>";
_2+="<div id='popup-pointer' style='position:absolute;width:20px;height:22px;overflow:hidden;'><div style='width:650px;height:685px;margin-left:-50px;margin-top:-654px;'></div></div>";
_2+="<div id='popup-fillercontainer'></div>";
_2+="<div id='popup-content' style='position:absolute;left:13px;top:13px;overflow:auto;z-index:1;'></div></div>";
this.popup.innerHTML=_2;
this.popup.style.position="absolute";
this.popup.style.visibility="hidden";
this.popup.style.left="-1000px";
this.popup.style.top="-1000px";
document.body.appendChild(this.popup);
var _3=this.popup.childNodes[0];
var _4=this.popup.childNodes[1];
var _5=this.popup.childNodes[2];
var _6=this.popup.childNodes[3];
var _7=this.popup.childNodes[4];
var _8=this.popup.childNodes[5];
var _9=this.popup.childNodes[6];
this.eClickClose=MQA._prEvent.EventCallback(this,"clickClose");
MQA._prEvent.observe(_3,"click",this.eClickClose);
this.popup.content=this.popup.childNodes[7];
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
MQA._prEvent.observe(this.popup,"click",this.eClick);
this.eDblClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
MQA._prEvent.observe(this.popup,"dblclick",this.eClick);
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
MQA._prEvent.observe(this.popup,"mousedown",this.eMouseDown);
if(MQA.browser.name=="msie"&&(MQA.browser.version>5)&&(MQA.browser.version<7)){
_4.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_5.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_6.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_7.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_8.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
_3.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
}else{
_4.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_5.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_6.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_7.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_8.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
_3.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
}
};
MQA.InfoWindow.prototype.dispose=function(){
MQA._prEvent.stopObserving(this.popup.childNodes[0],"click",this.eClickClose);
MQA._prEvent.stopObserving(this.popup,"click",this.eClick);
MQA._prEvent.stopObserving(this.popup,"dblClick",this.eDblClick);
this.map=null;
this.opener=null;
this.content=null;
this.popup.oncontextmenu=null;
this.popup.innerHTML=null;
this.popup.content=null;
this.popup.id;
this.popup.innerHTML=null;
this.popup.outerHTML="";
MQA.Util._deleteDOMObject(this.popup);
this.popup=null;
delete this.popup;
};
MQA.InfoWindow.prototype.onOpen=function(e){
MQA.EventManager.trigger(this,"opened",e);
};
MQA.InfoWindow.prototype.onClose=function(e){
MQA.EventManager.trigger(this,"closed",e);
};
MQA.InfoWindow.prototype.onClickedClosed=function(e){
e=new MQA.Event("MQA.InfoWindow.clickedClosed");
MQA.EventManager.trigger(this,"clickedclosed",e);
MQA._prEvent.stop(e);
};
MQA.InfoWindow.prototype.clickClose=function(_d){
this.hide();
this.onClickedClosed(_d);
MQA._prEvent.stop(_d);
};
MQA.InfoWindow.prototype.onClick=function(_e){
_e.cancelBubble=true;
};
MQA.InfoWindow.prototype.onDoubleClick=function(_f){
_f.cancelBubble=true;
};
MQA.InfoWindow.prototype.onMouseDown=function(evt){
MQA._prEvent.stop(evt);
};
MQA.InfoWindow.prototype.hide=function(){
if(!this.isHidden()){
if(this.popup.style.visibility!="hidden"){
this.popup.style.visibility="hidden";
this.popup.style.display="none";
}
if(this.opener!=null){
if(this.map.getDeclutter()){
if((this.map.getDeclutter().getDeclutterMode()!=0)&&this.opener.decluttered){
this.opener.setVisible(false);
}
}
this.opener.onInfoWindowClose(new MQA.Event("MQTileMap.infoWindowClose"));
this.opener=null;
}
this.onClose(new MQA.Event("MQA.InfoWindow.close"));
}
};
MQA.InfoWindow.prototype.setOpenerAndShow=function(_11){
this.show();
this.opener=_11;
};
MQA.InfoWindow.prototype.show=function(){
if(!this.isHidden()){
this.hide();
}
this.popup.style.display="block";
if(this.isAttachedToPoi){
var _12=this.offset.y;
var _13=this.offset.x;
}else{
var _12=this.point.y;
var _13=this.point.x;
}
var _14=this.popup.offsetHeight+3;
var _15=25;
this.popup.style.top=(_12-_14)+"px";
this.popup.style.left=(_13-_15)+"px";
this.popup.style.visibility="visible";
this.avoidPopupCollisions(this.popup);
this.onOpen(new MQA.Event("MQA.InfoWindow.open"));
};
MQA.InfoWindow.prototype.isHidden=function(){
return (this.popup.style.visibility=="hidden");
};
MQA.InfoWindow.prototype.modify=function(_16,_17,_18,_19){
if(_16){
this.point=_16;
}
if(_17){
this.title=_17;
}
if(_18){
this.content=_18;
}
this.offset=new MQA.PointXY(0,0);
if(_19){
this.offset=_19;
}
this.popup.style.position="absolute";
this.resize(false);
};
MQA.InfoWindow.prototype.getMaxWidth=function(){
return this.maxwidth;
};
MQA.InfoWindow.prototype.setMaxWidth=function(_1a){
_1a=parseInt(_1a);
if(isNaN(_1a)){
return;
}
this.maxwidth=(_1a>this.map.width-50)?(this.map.width-50):(_1a<this.minwidth)?this.minwidth:_1a;
};
MQA.InfoWindow.prototype.getMinWidth=function(){
return this.minwidth;
};
MQA.InfoWindow.prototype.setMinWidth=function(_1b){
_1b=parseInt(_1b);
if(isNaN(_1b)){
return;
}
this.minwidth=(_1b<60)?60:(_1b>this.maxwidth)?this.maxwidth:_1b;
};
MQA.InfoWindow.prototype.getContentWidth=function(){
return this.contentwidth;
};
MQA.InfoWindow.prototype.setContentWidth=function(_1c){
this.contentwidth=_1c;
};
MQA.InfoWindow.prototype.getTitleBackgroundColor=function(){
return this.titlebackgroundcolor;
};
MQA.InfoWindow.prototype.setTitleBackgroundColor=function(_1d){
this.titlebackgroundcolor=_1d;
};
MQA.InfoWindow.prototype.getPointLL=function(){
return this.map.getXYToLL(this.point);
};
MQA.InfoWindow.prototype.getPointXY=function(){
return this.point;
};
MQA.InfoWindow.prototype.getPixelOffset=function(){
return this.offset;
};
MQA.InfoWindow.prototype.avoidPopupCollisions=function(_1e){
var _1f=this.getCollisionInfo(_1e);
if(_1f.panX!=0||_1f.panY!=0){
this.map.slideMapByOffset(new MQA.PointXY(_1f.panX,_1f.panY));
}
};
MQA.InfoWindow.prototype.getCollisionInfo=function(_20){
var _21=this.map.parent;
var _22={panX:0,panY:0};
var _23=MQA.Util.getParentOffset(_21);
var _24=MQA.Util.getParentOffset(_20);
var _25=10;
_24.x=_24.x-_23.x-_25;
_24.y=_24.y-_23.y-_25;
var _26={width:37,height:300};
var _27={width:139,height:15};
var _28=(_24.x<_26.width&&_24.y<_26.height+_25)?_26.width:0;
var _29=(_24.x+_20.clientWidth>_21.clientWidth-_27.width&&_24.y<_27.height+_25)?_27.height:0;
if(_20.clientWidth>0&&_20.clientHeight>0){
if(_24.x<_28){
_22.panX=Math.abs(_24.x-_28);
}else{
if(_24.x+_25+_20.clientWidth>_21.clientWidth){
_22.panX=-1*(_20.clientWidth+_24.x+_25-_21.clientWidth);
}
}
if(_24.y<_29){
_22.panY=Math.abs(_24.y-_29);
}else{
if(_24.y+_20.clientHeight>_21.clientHeight){
_22.panY=_21.clientHeight-_24.y-_20.clientHeight;
}
}
}
return _22;
};
MQA.InfoWindow.prototype.getOpener=function(){
return this.opener;
};
MQA.InfoWindow.prototype.resize=function(_2a){
var _2b=this.popup.childNodes[0];
var _2c=this.popup.childNodes[1];
var _2d=this.popup.childNodes[2];
var _2e=this.popup.childNodes[3];
var _2f=this.popup.childNodes[4];
var _30=this.popup.childNodes[5];
var _31=this.popup.childNodes[6];
var _32="";
if(this.getTitleBackgroundColor()){
_32=" style=background:"+this.getTitleBackgroundColor();
}
_31.innerHTML="";
this.popup.style.display="block";
this.popup.content.style.width="auto";
this.popup.content.style.height="auto";
this.popup.content.style.overflow="visible";
var _33="";
if(_2a){
if(this.popup.content){
_33=this.popup.content.innerHTML;
}
}else{
_33="<div class='mqpoiheading'"+_32+" title='"+MQA.Util.stripHTMLTags(this.title.innerHTML)+"'>"+this.title.innerHTML+"</div><div class='mqpoicontenttext'>"+this.content.innerHTML+"</div>";
}
this.popup.content.innerHTML=_33;
var _34=this.popup.content.childNodes[0];
var _35=this.popup.content.childNodes[1];
_34.style.display="none";
_35.style.whiteSpace="nowrap";
_35.style.overflow="visible";
_35.style.width="auto";
_35.style.height="auto";
var _36=this.popup.content.offsetWidth+35+2;
var _37=(_36>this.maxwidth)?18:0;
_36=(_36>this.maxwidth)?this.maxwidth:(_36<this.minwidth)?this.minwidth:_36;
var _38=_36-35;
_35.style.width=_38+"px";
_34.style.display="";
_35.style.whiteSpace="";
var _39=this.popup.content.offsetHeight+_37+30+2;
var _3a=(_39>this.maxheight)?18:0;
_38+=_3a;
_36+=_3a;
_34.style.width=(_38-18)+"px";
var _3b=_34.childNodes[0];
if(typeof (_3b.tagName)=="undefined"){
_34.innerHTML="<div>"+this.title.innerHTML+"</div>";
_3b=_34.childNodes[0];
}
_3b.style.display="inline";
if((_3b.offsetWidth>(_38-18))&&((_38-18)>25)){
var _3c=MQA.Util.stripHTMLTags(this.title.innerHTML);
var _3d=_3b.innerHTML;
for(var i=_3c.length;(_3b.offsetWidth>=(_38-18)&&i>0);i--){
_3b.innerHTML=MQA.Util.getHTMLSubstring(_3d,i,"&nbsp;...");
}
}
_39=this.popup.content.offsetHeight+_37+30+2;
_39=(_39>this.maxheight)?this.maxheight:_39;
var _3f=_39-30+2;
var _40=Math.ceil(_38/600);
var _41=_38%600;
var _42=Math.ceil(_3f/600);
var _43=_3f%600;
var _44,_45,_46,_47;
var _48,_49;
var _4a,_4b;
var _4c,_4d,_4e,_4f;
var _50=600;
var _51=600;
for(var i=1;i<=_42;i++){
for(var j=1;j<=_40;j++){
if(i==1&&j==1){
continue;
}
_44=(j==_40&&_41!=0)?_41:_50;
_45=(i==_42&&_43!=0)?_43:_51;
_48=(j==1)?15:0;
_49=(i==1)?15:0;
_4a=(i==1)?0:15;
_4b=(j==1)?0:15;
_4c=(-1*_4b);
_4d=(-1*_4a);
_46=(_44+_48);
_47=(_45+_49);
_4e=(((j-1)*_50)+_4b);
_4f=(((i-1)*_51)+_4a);
this.createFillerDiv(_4c,_4d,_46,_47,_4e,_4f);
if(i==1){
_4c=-15;
_4d=-630;
_46=(_44+_48);
_47=15;
_4e=(((j-1)*_50)+_4b);
_4f=(_3f+15);
this.createFillerDiv(_4c,_4d,_46,_47,_4e,_4f);
}
}
if(i>1){
_4c=-630;
_4d=-15;
_46=20;
_47=(_45+_49);
_4e=(_38+15);
_4f=(((i-1)*_51)+_4a);
this.createFillerDiv(_4c,_4d,_46,_47,_4e,_4f);
}
}
var _53=(_38>_50)?_50:_38;
var _54=(_3f>_51)?_51:_3f;
this.popup.style.width=(_36)+"px";
this.popup.style.height=(_39)+"px";
this.popup.content.style.width=_38+"px";
this.popup.content.style.height=_3f+"px";
_2b.style.left=(_36-38)+"px";
_2b.style.top="12px";
_34.style.width=(_38-18)+"px";
_35.style.width=_38+"px";
_35.style.height=(_3f-_34.offsetHeight-5)+"px";
_35.style.overflow="auto";
_2c.style.width=_53+15+"px";
_2c.style.height=_54+15+"px";
_2d.style.left=_38+15+"px";
_2d.style.height=_54+15+"px";
_2e.style.top=_3f+15+"px";
_2e.style.width=_53+15+"px";
_2f.style.top=_3f+15+"px";
_2f.style.left=_38+15+"px";
_30.style.left="14px";
_30.style.top=_3f+15+"px";
if(_2a){
this.popup.style.visibility="hidden";
this.show();
}
};
MQA.InfoWindow.prototype.createFillerDiv=function(_55,_56,_57,_58,_59,_5a){
var _5b=this.popup.childNodes[6];
var _5c=document.createElement("div");
_5c.style.position="absolute";
_5c.style.overflow="hidden";
var str="<div style='width:650px;height:685px;'></div>";
_5c.innerHTML=str;
_5b.appendChild(_5c);
if((MQA.browser.name=="msie")&&(parseFloat(MQA.browser.version)<7)){
_5c.childNodes[0].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.infoWindowSrc+"', sizingMethod='scale')";
}else{
_5c.childNodes[0].style.background="url("+this.infoWindowSrc+") no-repeat";
}
_5c.childNodes[0].style.marginLeft=_55+"px";
_5c.childNodes[0].style.marginTop=_56+"px";
_5c.style.width=_57+"px";
_5c.style.height=_58+"px";
_5c.style.left=_59+"px";
_5c.style.top=_5a+"px";
};
MQA.InfoWindow.prototype.setPopupContentOverflow=function(_5e){
if(_5e&&(MQA.browser.name=="firefox")&&this.popup.content.childNodes[1]){
var _5f=this.popup.content.childNodes[1].scrollLeft;
var top=this.popup.content.childNodes[1].scrollTop;
this.popup.content.childNodes[1].style.overflow=_5e;
this.popup.content.childNodes[1].scrollLeft=_5f;
this.popup.content.childNodes[1].scrollTop=top;
}
};

MQA.RolloverWindow=function(_1){
this.map=_1;
this.enabled=true;
this.point=null;
this.title=null;
this.content=null;
this.offset=new MQA.Point(0,0);
this.opener=null;
this.maxwidth=null;
this.artUrl=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/";
this.flipStateEnabled=false;
this.leftRolloverSrc=this.artUrl+"rollover-left.png";
this.rightRolloverSrc=this.artUrl+"rollover-right.png";
this.minipopup=null;
this.textLength=31;
this.leftRolloverOffsetX=-25;
this.rightRolloverOffsetX=-193;
this.createRolloverWindow();
this.rolloverOffsetY=13-this.minipopup.offsetHeight;
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
MQA._prEvent.observe(this.minipopup,"click",this.eClick);
this.eDblClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
MQA._prEvent.observe(this.minipopup,"dblclick",this.eDblClick);
};
MQA.RolloverWindow.prototype.dispose=function(){
MQA._prEvent.stopObserving(this.minipopup,"click",this.eClick);
MQA._prEvent.stopObserving(this.minipopup,"dblclick",this.eDblClick);
this.map=null;
this.opener=null;
this.minipopup.oncontextmenu=null;
this.minipopup.innerHTML=null;
this.minipopup.outerHTML="";
MQA.Util._deleteDOMObject(this.minipopup);
this.minipopup=null;
};
MQA.RolloverWindow.prototype.onOpen=function(e){
MQA.EventManager.trigger(this,"opened",e);
};
MQA.RolloverWindow.prototype.onClose=function(e){
MQA.EventManager.trigger(this,"closed",e);
};
MQA.RolloverWindow.prototype.onClick=function(_4){
_4.cancelBubble=true;
};
MQA.RolloverWindow.prototype.onDoubleClick=function(_5){
_5.cancelBubble=true;
};
MQA.RolloverWindow.prototype.hide=function(_6){
if(!this.isHidden()){
if(this.minipopup.style.visibility!="hidden"){
this.minipopup.style.visibility="hidden";
}
if(this.opener!=null){
this.opener.onRolloverClose(new MQA.Event("MQPoi.rolloverClose"));
this.opener=null;
}
this.onClose(new MQA.Event("MQA.RolloverWindow.close"));
}
};
MQA.RolloverWindow.prototype.setOpenerAndShow=function(_7){
this.show();
this.opener=_7;
};
MQA.RolloverWindow.prototype.show=function(){
if(!this.isHidden()){
this.hide();
}
var _8=this.offset.y;
var _9=this.offset.x;
var _a=this.leftRolloverSrc;
this.minipopup.style.top=(_8+this.rolloverOffsetY)+"px";
this.minipopup.style.left=(_9+this.leftRolloverOffsetX)+"px";
this.minipopup.style.zIndex=-1;
if(this.flipStateEnabled){
var _b=this.getCollisionInfo(this.minipopup);
if(_b.panX<0){
_a=this.rightRolloverSrc;
this.minipopup.style.top=(_8+this.rolloverOffsetY)+"px";
this.minipopup.style.left=(_9+this.rightRolloverOffsetX)+"px";
}
}
if(MQA.browser.name=="msie"&&(MQA.browser.version>5)&&(MQA.browser.version<7)){
this.minipopup.style.display="none";
this.minipopup.style.visibility="visible";
this.minipopup.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_a+"', sizingMethod='scale')";
this.minipopup.style.display="block";
}else{
this.minipopup.style.background="";
this.minipopup.style.background="url("+_a+") left";
}
this.minipopup.style.visibility="visible";
this.onOpen(new MQA.Event("MQA.RolloverWindow.open"));
};
MQA.RolloverWindow.prototype.isHidden=function(){
return (this.minipopup.style.visibility=="hidden");
};
MQA.RolloverWindow.prototype.modify=function(_c,_d,_e,_f){
if(_c){
this.point=_c;
}
if(_d){
this.content=_d;
}
if(_e){
this.offset=_e;
}
this.minipopup.style.position="absolute";
this.minipopup.style.zIndex=9;
var _10=MQA.Util.stripHTMLTags(this.content.innerHTML);
if(_f.infoWindowContent&&this.textLength==31){
this.textLength-=2;
}
if(_f.infoWindowContent){
_10=(_10.length>this.textLength)?MQA.Util.getHTMLSubstring(this.content.innerHTML,this.textLength,"&nbsp;...&nbsp;&raquo;"):MQA.Util.getHTMLSubstring(this.content.innerHTML,_10.length,"&nbsp;&raquo;");
}else{
_10=(_10.length>this.textLength)?MQA.Util.getHTMLSubstring(this.content.innerHTML,this.textLength,"&nbsp;..."):MQA.Util.getHTMLSubstring(this.content.innerHTML,_10.length,"");
}
this.minipopup.innerHTML="<div class='mqminipopuphead'>"+_10+"</div>";
};
MQA.RolloverWindow.prototype.getMaxWidth=function(){
return this.maxWidth;
};
MQA.RolloverWindow.prototype.setMaxWidth=function(_11){
this.maxWidth=_11;
};
MQA.RolloverWindow.prototype.getPointLL=function(){
return this.map.getXYToLL(this.point);
};
MQA.RolloverWindow.prototype.getPointXY=function(){
return this.point;
};
MQA.RolloverWindow.prototype.getPixelOffset=function(){
return this.offset;
};
MQA.RolloverWindow.prototype.setRolloverGraphic=function(_12,_13){
if(typeof _12=="undefined"&&typeof _13=="undefined"){
this.setDefaultRollover();
}else{
if(typeof _12!="undefined"){
this.leftRolloverSrc=_12;
}
if(typeof _13!="undefined"){
this.rightRolloverSrc=_13;
}
}
};
MQA.RolloverWindow.prototype.getRolloverGraphic=function(_14){
var _15="";
if(typeof _14=="undefined"||_14=="left"){
_15=this.leftRolloverSrc;
}else{
if(_14=="right"){
_15=this.rightRolloverSrc;
}
}
return _15;
};
MQA.RolloverWindow.prototype.setDefaultRollover=function(){
this.leftRolloverSrc=this.artUrl+"rollover-left.png";
this.rightRolloverSrc=this.artUrl+"rollover-right.png";
this.setRolloverGraphic(this.leftRolloverSrc,this.rightRolloverSrc);
};
MQA.RolloverWindow.prototype.setFlipStateEnabled=function(_16){
if(typeof _16=="undefined"||typeof _16!="boolean"){
this.flipStateEnabled=false;
}else{
this.flipStateEnabled=_16;
}
};
MQA.RolloverWindow.prototype.getFlipStateEnabled=function(){
return this.flipStateEnabled;
};
MQA.RolloverWindow.prototype.getCollisionInfo=function(_17,_18,_19){
var _1a=this.map.parent;
var _1b={panX:0,panY:0};
var _1c=(_18)?_18:false;
var _1d=(_19)?_19:false;
var _1e=MQA.Util.getParentOffset(_1a);
var _1f=MQA.Util.getParentOffset(_17);
var _20=0;
_1f.x=_1f.x-_1e.x-_20;
_1f.y=_1f.y-_1e.y-_20;
var _21=(_1c)?{width:37,height:300}:{width:0,height:0};
var _22=(_1d)?{width:139,height:15}:{width:0,height:0};
var _23=(_1f.x<_21.width&&_1f.y<_21.height+_20)?_21.width:0;
var _24=(_1f.x+_17.clientWidth>_1a.clientWidth-_22.width&&_1f.y<_22.height+_20)?_22.height:0;
if(_17.clientWidth>0&&_17.clientHeight>0){
if(_1f.x<_23){
_1b.panX=Math.abs(_1f.x-_23);
}else{
if(_1f.x+_20+_17.clientWidth>_1a.clientWidth){
_1b.panX=-1*(_17.clientWidth+_1f.x+_20-_1a.clientWidth);
}
}
if(_1f.y<_24){
_1b.panY=Math.abs(_1f.y-_24);
}else{
if(_1f.y+_17.clientHeight>_1a.clientHeight){
_1b.panY=_1a.clientHeight-_1f.y-_17.clientHeight;
}
}
}
return _1b;
};
MQA.RolloverWindow.prototype.createRolloverWindow=function(){
if(this.minipopup){
this.minipopup.parentNode.removeChild(this.minipopup);
this.minipopup=null;
}
this.minipopup=document.createElement("div");
this.minipopup.id="minipopup";
this.minipopup.className="mqminipopup";
this.minipopup.currentElement=null;
this.minipopup.style.left="-1000px";
this.minipopup.style.top="-1000px";
this.minipopup.oncontextmenu=function(){
return false;
};
document.body.appendChild(this.minipopup);
this.minipopup.style.position="absolute";
this.minipopup.style.visibility="hidden";
};
MQA.RolloverWindow.prototype.setTextLength=function(_25){
if(typeof _25=="undefined"||isNaN(parseInt(_25))){
this.textLength=31;
}else{
this.textLength=parseInt(_25);
}
};
MQA.RolloverWindow.prototype.getTextLength=function(){
return this.textLength;
};
MQA.RolloverWindow.prototype.setLeftRolloverOffsetX=function(_26){
if(typeof _26=="undefined"||isNaN(parseInt(_26))){
this.leftRolloverOffsetX=-25;
}else{
this.leftRolloverOffsetX=parseInt(_26);
}
};
MQA.RolloverWindow.prototype.getLeftRolloverOffsetX=function(){
return this.leftRolloverOffsetX;
};
MQA.RolloverWindow.prototype.setRightRolloverOffsetX=function(_27){
if(typeof _27=="undefined"||isNaN(parseInt(_27))){
this.rightRolloverOffsetX=-193;
}else{
this.rightRolloverOffsetX=parseInt(_27);
}
};
MQA.RolloverWindow.prototype.getRightRolloverOffsetX=function(){
return this.rightRolloverOffsetX;
};
MQA.RolloverWindow.prototype.setRolloverOffsetY=function(_28){
if(typeof _28=="undefined"||isNaN(parseInt(_28))){
this.rolloverOffsetY=(13-this.minipopup.offsetHeight);
}else{
this.rolloverOffsetY=parseInt(_28);
}
};
MQA.RolloverWindow.prototype.getRolloverOffsetY=function(){
return this.rolloverOffsetY;
};


MQA.TileMap=function(_1,_2,_3,_4,_5){
this.tileLayers=new MQA.TileLayerCollection;
this.showOurMaps=true;
var _6=new MQA.RectLL(new MQA.PointLL(90,-180),new MQA.PointLL(-90,180));
this.satLayer=new MQA.SatTileLayer(this,MQA.TILE_LAYER_ID.SAT,MQA.SatImageTile,{},_6,null,null,1,0,null);
this.tileLayers.add(this.satLayer);
this.strlblbLayer=new MQA.StrlblTileLayer(this,MQA.TILE_LAYER_ID.HYB,MQA.StrlblImageTile,{},_6,null,null,1,0,null);
this.tileLayers.add(this.strlblbLayer);
this.mapLayer=new MQA.MapTileLayer(this,MQA.TILE_LAYER_ID.MAP,MQA.MapImageTile,{},_6,null,null,1,0,null);
this.tileLayers.add(this.mapLayer);
this.div1=document.createElement("div");
this.div1.id="map.div1";
this.div1.style.width=_1.style.width;
this.div1.style.height=_1.style.height;
this.div1.style.zIndex=0;
_1.style.position="relative";
this.parent2=_1;
_1.appendChild(this.div1);
this.controls=[];
this._mapShapes=new MQA.ShapeCollection();
this._mapShapes.setName(this._mapShapes.guid);
this._mapShapes.setDeclutter(true);
this._shapeCollections=[this._mapShapes];
try{
this.mydeclutter=new MQA.Declutter(this);
}
catch(err){
this.mydeclutter=null;
}
this.iwparent=document.createElement("div");
if(_2==null){
_2=1;
}
if(_3==null){
_3=new MQA.LatLng(38.134557,-98.4375);
}
this.showRte=false;
this.updateOverlaysX=true;
this.updateOverlaysY=true;
this.tileMode=MQA.MAP_TYPE.MAP;
this.bestFitRect=null;
this.keepCenter=null;
this.bestFitMargin=0;
if(_4==MQA.MAP_TYPE.SAT){
this.tileMode=_4;
}
if(_4==MQA.MAP_TYPE.HYB){
this.tileMode=_4;
}
if(_4==MQA.MAP_TYPE.NONE){
this.showOurMaps=false;
}
var me=this;
if(MQA.MASTER_BROKER==null){
MQA.MASTER_BROKER=new MQA.SlideBroker();
}
this.brokerKey=MQA.MASTER_BROKER.addListener(me);
this.parent=this.div1;
if(!this.parent.style.height||parseInt(this.parent.style.height)<100){
this.parent.style.width="550px";
this.parent.style.height="475px";
}
this.width=parseInt(this.parent.style.width);
this.height=parseInt(this.parent.style.height);
if(this.width>MQA.MAXMAPWIDTH){
this.width=MQA.MAXMAPWIDTH;
}
if(this.height>MQA.MAXMAPHEIGHT){
this.height=MQA.MAXMAPHEIGHT;
}
if(_5!=null){
if(_5.getBestFitMargin()!=null){
this.setBestFitMargin(_5.getBestFitMargin());
}
if(_5.getBestFitRect()!=null){
this.bestFitRect=_5.getBestFitRect();
this.keepCenter=_5.isKeepCenter();
_2=this.getZoom(_5.getBestFitRect(),_3,_5.isKeepCenter(),_5.getMinZoom(),_5.getMaxZoom());
if(_5.isKeepCenter()==false){
var _8=_5.getBestFitRect();
var _9=new MQA.PointLL(_8.ul.lat,_8.ul.lng);
var _a=new MQA.PointLL(_8.lr.lat,_8.lr.lng);
_3=new MQA.PointLL(((_9.lat+_a.lat)/2),((_9.lng+_a.lng)/2));
}
}
}
this.zoom=(_2>16)?16:parseInt(_2);
this.scale=MQA.SCALES[this.zoom];
this.tilesize=MQA.TILESIZE;
this.centerlat=_3.lat;
this.centerlng=_3.lng;
this.lastlat=this.centerlat;
this.lastlng=this.centerlng;
this.maprows=Math.ceil(this.height/this.tilesize)+2;
this.mapcols=Math.ceil(this.width/this.tilesize)+2;
this.disabled=false;
this.drag=false;
this.slide=false;
this.routerect=null;
this.clickEvent=MQA.EVENT_NONE;
this.clickOper=-1;
this.rteserver="";
this.rtesession="";
this.routebestfit=false;
this.mapaccum1=0;
this.sataccum1=0;
this.hybaccum1=0;
this.mapaccum2=0;
this.sataccum2=0;
this.hybaccum2=0;
this.diffaccum=0;
this.moving=false;
this.startingToMove=false;
this.div=MQA.Util.createParentDiv("mqtiledmap",0,0,"absolute",0,0,0,null,null);
this.parent.style.overflow="hidden";
this.parent.style.background="#FFFFFF";
this.parent.style.position="relative";
this.parent.style.top="0px";
this.parent.style.left="0px";
this.parent.style.width=this.width+"px";
this.parent.style.height=this.height+"px";
this.parent.appendChild(this.div);
try{
if(navigator.userAgent.indexOf("MSIE")>=0){
document.execCommand("BackgroundImageCache",false,true);
}
}
catch(e){
}
if(this.showOurMaps){
this.div.ldiv=MQA.Util.createParentDiv("mqloading",0,0,"absolute",0,0,0,(this.mapcols*MQA.TILESIZE),(this.maprows*MQA.TILESIZE));
this.div.ldiv.id="map.div.ldiv";
this.div.ldiv.style.backgroundImage="url("+MQA.RESOURCES+"loading.gif)";
this.div.ldiv.style.backgroundRepeat="repeat";
this.div.appendChild(this.div.ldiv);
}
this.eMouseMove=MQA._prEvent.EventCallback(this,"onMouseMove");
this.eMouseUp=MQA._prEvent.EventCallback(this,"onMouseUp");
this.eMouseOut=MQA._prEvent.EventCallback(this,"onMouseOut");
this.eMouseOver=MQA._prEvent.EventCallback(this,"onMouseOver");
this.eMouseDown=MQA._prEvent.EventCallback(this,"onMouseDown");
MQA._prEvent.observe(document,"mousemove",this.eMouseMove);
MQA._prEvent.observe(document,"mouseup",this.eMouseUp);
MQA._prEvent.observe(document,"mouseout",this.eMouseOut);
MQA._prEvent.observe(this.parent,"mouseover",this.eMouseOver);
MQA._prEvent.observe(this.parent,"mousedown",this.eMouseDown);
this.rtehighlight=MQA.Util.createImgHolder(null,"on","none","none",50);
this.rtehighlight.id="mqrtehl";
this.rtehighlight.onload=MQA._prEvent.hitch(this,"showRouteHighlight");
this.rtehighlight.onselectstart=MQA._prEvent.falseFunction;
this.rtehighlight.oncontextmenu=MQA._prEvent.falseFunction;
this.rtehighlight.style.position="absolute";
this.rtehighlight.style.opacity="0.6";
this.rtehighlight.style.filter="alpha(opacity='60')";
this.rtehighlight.GALLERYIMG="no";
this.rtehighlight.src=MQA.NOTHING;
this.div.appendChild(this.rtehighlight);
this.prnstyle=document.createElement("style");
this.prnstyle.type="text/css";
this.prnstyle.media="print";
var _b="img#mqrtehl { visibility:hidden; display:none }";
if(this.prnstyle.styleSheet){
this.prnstyle.styleSheet.cssText=_b;
}else{
var _c=document.createTextNode(_b);
this.prnstyle.appendChild(_c);
}
document.body.appendChild(this.prnstyle);
this.loading=MQA.Util.createImgHolder(null,"on","none","none",null);
this.loading.src=MQA.RESOURCES+"loading.gif";
this.parent.appendChild(this.loading);
this.maptiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.maptiler);
this.sattiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.sattiler);
this.hybtiler=MQA.Util.createImgHolder(MQA.NOTHING,"on","none","none",null);
this.parent.appendChild(this.hybtiler);
this.logos=new Array(5);
this.logos[MQA.LOGO_MQ_LOGO]=MQA.Util.createImgLogo("none","on",MQA.CORNER_TOPLEFT,new MQA.PointXY(0,0),"absolute","block",22,null,95,15);
this.logos[MQA.LOGO_MQ_LOGO].src=MQA.RESOURCES+"mqlogo.gif";
this.setLogoPosition(this.logos[MQA.LOGO_MQ_LOGO]);
this.parent.appendChild(this.logos[MQA.LOGO_MQ_LOGO]);
this.logos[MQA.LOGO_MQ_SCALES]=document.createElement("div");
this.logos[MQA.LOGO_MQ_SCALES].corner=MQA.CORNER_TOPRIGHT;
this.logos[MQA.LOGO_MQ_SCALES].offset=new MQA.PointXY(0,0);
this.logos[MQA.LOGO_MQ_SCALES].style.position="absolute";
this.logos[MQA.LOGO_MQ_SCALES].style.display="block";
this.logos[MQA.LOGO_MQ_SCALES].style.zIndex=22;
this.logos[MQA.LOGO_MQ_SCALES].width="124";
this.logos[MQA.LOGO_MQ_SCALES].height="18";
this.logos[MQA.LOGO_MQ_SCALES].style.overflow="hidden";
this.logos[MQA.LOGO_MQ_SCALES].style.width="124px";
this.logos[MQA.LOGO_MQ_SCALES].style.height="18px";
this.logos[MQA.LOGO_MQ_SCALES].innerHTML="<img style='-moz-user-select:none;' unselectable='on' src='"+MQA.PROTOCOL+"//"+RESSERVER+"/scales/scalebar.gif' />";
this.setLogoPosition(this.logos[MQA.LOGO_MQ_SCALES]);
this.parent.appendChild(this.logos[MQA.LOGO_MQ_SCALES]);
this.logos[MQA.LOGO_MQ_COPY]=MQA.Util.createImgLogo("none","on",MQA.CORNER_BOTTOMLEFT,new MQA.PointXY(0,0),"absolute","block",22,null,103,12);
this.logos[MQA.LOGO_MQ_COPY].src=MQA.RESOURCES+"mqcopy.gif";
this.setLogoPosition(this.logos[MQA.LOGO_MQ_COPY]);
this.parent.appendChild(this.logos[MQA.LOGO_MQ_COPY]);
logoDisplay=(this.tileMode!=MQA.MAP_TYPE.SAT)?"block":"none";
this.logos[MQA.LOGO_MAP_COPY]=MQA.Util.createImgLogo("none","on",MQA.CORNER_BOTTOMRIGHT,new MQA.PointXY(0,0),"absolute",logoDisplay,22,null,190,12);
this.logos[MQA.LOGO_MAP_COPY].src=MQA.RESOURCES+MQA.VENDORLIST[1];
this.setLogoPosition(this.logos[MQA.LOGO_MAP_COPY]);
this.parent.appendChild(this.logos[MQA.LOGO_MAP_COPY]);
logoDisplay=(this.tileMode!=MQA.MAP_TYPE.MAP)?"block":"none";
this.logos[MQA.LOGO_SAT_COPY]=MQA.Util.createImgLogo("none","on",MQA.CORNER_BOTTOMRIGHT,new MQA.PointXY(0,-13),"absolute",logoDisplay,22,null,115,12);
this.logos[MQA.LOGO_SAT_COPY].src=MQA.RESOURCES+"sz1copy.gif";
this.setLogoPosition(this.logos[MQA.LOGO_SAT_COPY]);
this.parent.appendChild(this.logos[MQA.LOGO_SAT_COPY]);
this.grab_mousecursor=this.div.attachEvent?MQA.RESOURCES+"grab.cur":"-moz-grab";
this.grabbing_mousecursor=this.div.attachEvent?MQA.RESOURCES+"grabbing.cur":"-moz-grabbing";
this.current_mousecursor=this.grab_mousecursor;
this.div.style.cursor=this.current_mousecursor;
this.div.staticmapdiv=MQA.Util.createParentDiv("mqstaticmapdiv",0,0,"absolute",0,0,60,null,null);
this.div.appendChild(this.div.staticmapdiv);
this.div.poidiv=MQA.Util.createParentDiv("mqpoidiv",0,0,"absolute",0,0,90,null,null);
this.div.poidiv.style.cursor="auto";
this.div.poidiv.UNSELECTABLE="off";
this.div.appendChild(this.div.poidiv);
this.rebuildTiles();
this.mapShadowTop=document.createElement("div");
this.mapShadowTop.style.background="transparent url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/mapshadow-top.png) repeat-y scroll 0pt";
this.mapShadowTop.style.height="14px";
this.mapShadowTop.style.left="0pt";
this.mapShadowTop.style.position="absolute";
this.mapShadowTop.style.top="0pt";
this.mapShadowTop.style.width="5000px";
this.mapShadowTop.style.zIndex="20";
this.mapShadowTop.style.display="none";
this.div1.appendChild(this.mapShadowTop);
this.mapShadowLeft=document.createElement("div");
this.mapShadowLeft.style.background="transparent url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/mapshadow-side.png) repeat-y scroll 0pt";
this.mapShadowLeft.style.height="5000px";
this.mapShadowLeft.style.left="0pt";
this.mapShadowLeft.style.position="absolute";
this.mapShadowLeft.style.top="0pt";
this.mapShadowLeft.style.width="16px";
this.mapShadowLeft.style.zIndex="20";
this.mapShadowLeft.style.display="none";
this.div1.appendChild(this.mapShadowLeft);
this.surface=null;
this.overlayOffsetX=null;
this.overlayOffsetY=null;
this.poisurface=null;
this.poiLineOffsetX=null;
this.poiLineOffsetY=null;
this.traffic=null;
this.dcCanvasDiv=null;
this.dcCanvasContext=null;
this.canvasOffsetX=null;
this.canvasOffsetY=null;
this.infowindow=new MQA.InfoWindow(this);
this.infoWindowTitle=null;
this.infoWindowContent=null;
this.rolloverwindow=new MQA.RolloverWindow(this);
this.rolloversEnabled=true;
this.eClick=MQA._prEvent.EventCallback(this,"onClick");
this.eDoubleClick=MQA._prEvent.EventCallback(this,"onDoubleClick");
MQA._prEvent.observe(this.div1,"click",this.eClick);
MQA._prEvent.observe(this.div1,"dblclick",this.eDoubleClick);
this.savedCenter=null;
this.savedZoomLevel=null;
this.savedMapType=null;
this.saveState();
MQA.incrTileMapCount();
this.uniqueMapID=MQA.getTileMapCount();
this.startDragPoint=new MQA.Point(0,0);
this.endDragPoint=new MQA.Point(0,0);
this.draggedObject=null;
this.staticMapEnabled=false;
this.turnEventsOff=false;
this.batchCount=0;
if(_5!=null){
this.showDraggableMap();
}
};
MQA.TileMap.prototype.getTileLayerById=function(id){
return this.tileLayers.getById(id);
};
MQA.TileMap.prototype.removeAllTileLayers=function(){
var y=this.tileLayers.getSize();
for(var x=3;x<y;x++){
this.tileLayers.getAt(x).remove();
var mqe=new MQA.Event("MQA.TileMap.layerRemoved");
mqe.layer=this.tileLayers.getAt(x);
this.onLayerRemoved(mqe);
}
for(var y=this.tileLayers.getSize();y>3;y--){
this.tileLayers.remove(y-1);
}
};
MQA.TileMap.prototype.removeTileLayer=function(_11){
_11.remove();
this.tileLayers.removeItem(_11);
_11.isAdded=false;
var mqe=new MQA.Event("MQA.TileMap.layerRemoved");
mqe.layer=_11;
this.onLayerRemoved(mqe);
};
MQA.TileMap.prototype.addTileLayer=function(_13){
if((_13.tileLayerId!=MQA.TILE_LAYER_ID.SAT)&&(_13.tileLayerId!=MQA.TILE_LAYER_ID.HYB)&&(_13.tileLayerId!=MQA.TILE_LAYER_ID.MAP)){
this.tileLayers.add(_13);
_13.isAdded=true;
}
_13.draw();
var mqe=new MQA.Event("MQA.TileMap.layerAdded");
mqe.layer=_13;
this.onLayerAdded(mqe);
};
MQA.TileMap.prototype.addTileLayers=function(_15){
if(_15){
var h=_15.getSize();
for(i=0;i<h;i++){
this.addTileLayer(_15.getAt(i));
}
}
};
MQA.TileMap.prototype.replaceTileLayers=function(_17){
this.removeAllTileLayers();
this.addTileLayers(_17);
};
MQA.TileMap.prototype.onLayerDrawn=function(e){
MQA.EventManager.trigger(this,"layerdrawn",e);
};
MQA.TileMap.prototype.onLayerAdded=function(e){
MQA.EventManager.trigger(this,"layeradded",e);
};
MQA.TileMap.prototype.onLayerRemoved=function(e){
MQA.EventManager.trigger(this,"layerremoved",e);
};
MQA.TileMap.prototype._subDispose=function(){
for(var k in this){
try{
delete this[k];
}
catch(e){
}
}
};
MQA.TileMap.prototype.setBatchMode=function(_1c){
if(_1c){
this.batchCount+=1;
}else{
this.batchCount-=1;
if(this.batchCount<0){
this.batchCount=0;
}
if(this.batchCount==0){
var dc=this.getDeclutter();
if(dc){
dc.setDeclutterMode(dc.getDeclutterMode());
}
}
}
};
MQA.TileMap.prototype.getDragOffset=function(){
return new MQA.Point(this.m_dragoffX,this.m_dragoffY);
};
MQA.TileMap.prototype.onClick=function(e){
if((this.click)?this.click:false){
var _1f=MQA.Util.getParentOffset(this.parent);
var _20=0;
var _21=0;
if(typeof (window.pageYOffset)=="number"){
_21=window.pageYOffset;
_20=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_21=document.body.scrollTop;
_20=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_21=document.documentElement.scrollTop;
_20=document.documentElement.scrollLeft;
}
}
}
var mqe=new MQA.Event();
mqe.srcObject=e.srcObject;
if(!e.clientX&&e.domEvent){
mqe.domEvent=e.domEvent;
}else{
mqe.domEvent=e;
}
var cx=(mqe.domEvent.clientX+_20)-_1f.x;
var cy=(mqe.domEvent.clientY+_21)-_1f.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.ll=this.pixToLL(mqe.xy);
mqe.eventName="MQA.TileMap.click";
MQA.EventManager.trigger(this,"click",mqe);
}
};
MQA.TileMap.prototype.onDoubleClick=function(e){
var _26=MQA.Util.getParentOffset(this.parent);
var _27=0;
var _28=0;
if(typeof (window.pageYOffset)=="number"){
_28=window.pageYOffset;
_27=window.pageXOffset;
}else{
if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
_28=document.body.scrollTop;
_27=document.body.scrollLeft;
}else{
if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
_28=document.documentElement.scrollTop;
_27=document.documentElement.scrollLeft;
}
}
}
var mqe=new MQA.Event();
mqe.srcObject=e.srcObject;
if(!e.clientX&&e.domEvent){
mqe.domEvent=e.domEvent;
}else{
mqe.domEvent=e;
}
var cx=(mqe.domEvent.clientX+_27)-_26.x;
var cy=(mqe.domEvent.clientY+_28)-_26.y;
mqe.xy=new MQA.Point(cx,cy);
mqe.ll=this.pixToLL(mqe.xy);
mqe.eventName="MQA.TileMap.dblclick";
MQA.EventManager.trigger(this,"dblclick",mqe);
};
MQA.TileMap.prototype.onZoomStart=function(e){
this.infowindow.setPopupContentOverflow("hidden");
MQA.EventManager.trigger(this,"zoomstart",e);
};
MQA.TileMap.prototype.onZoomEnd=function(e){
this.updateShapeCollections();
this.handleOverlays();
if(this.traffic){
this.handleTraffic(true);
}
this.updatePois();
this.infowindow.setPopupContentOverflow("auto");
MQA.EventManager.trigger(this,"zoomend",e);
};
MQA.TileMap.prototype.onMapTypeChanged=function(e){
if(this.getDragOffset().x!=this.overlayOffsetX||this.getDragOffset().y!=this.overlayOffsetY){
this.handleOverlays();
}
MQA.EventManager.trigger(this,"maptypechanged",e);
};
MQA.TileMap.prototype.onShapeAdded=function(e){
MQA.EventManager.trigger(this,"shapeadded",e);
};
MQA.TileMap.prototype.onShapeRemoved=function(e){
MQA.EventManager.trigger(this,"shaperemoved",e);
};
MQA.TileMap.prototype.onMapCleared=function(e){
MQA.EventManager.trigger(this,"mapcleared",e);
};
MQA.TileMap.prototype.onInfoWindowOpen=function(e){
MQA.EventManager.trigger(this,"infowindowopen",e);
};
MQA.TileMap.prototype.onInfoWindowClose=function(e){
MQA.EventManager.trigger(this,"infowindowclose",e);
};
MQA.TileMap.prototype.onMoveStart=function(e){
this.infowindow.setPopupContentOverflow("hidden");
MQA.EventManager.trigger(this,"movestart",e);
};
MQA.TileMap.prototype.onMove=function(e){
MQA.EventManager.trigger(this,"move",e);
};
MQA.TileMap.prototype.onMoveEnd=function(e){
this.infowindow.setPopupContentOverflow("auto");
MQA.EventManager.trigger(this,"moveend",e);
};
MQA.TileMap.prototype.handleMove=function(){
if(arguments.length==1){
var e=new MQA.Event();
var _38=arguments[0];
if(_38=="move"){
e.eventName="MQA.TileMap.move";
this.onMove(e);
}else{
if(_38=="movestart"){
e.eventName="MQA.TileMap.movestart";
this.onMoveStart(e);
}else{
if(_38=="moveend"){
e.eventName="MQA.TileMap.moveend";
this.onMoveEnd(e);
}
}
}
}
};
MQA.TileMap.prototype.onDragStart=function(e){
this.infowindow.setPopupContentOverflow("hidden");
MQA.EventManager.trigger(this,"dragstart",e);
};
MQA.TileMap.prototype.onDrag=function(e){
MQA.EventManager.trigger(this,"drag",e);
};
MQA.TileMap.prototype.onDragEnd=function(e){
this.infowindow.setPopupContentOverflow("auto");
MQA.EventManager.trigger(this,"dragend",e);
};
MQA.TileMap.prototype.handleDrag=function(){
if(arguments.length==1){
var e=new MQA.Event();
var _3d=arguments[0];
if(_3d=="drag"){
e.eventName="MQA.TileMap.drag";
this.onDrag(e);
}else{
if(_3d=="dragstart"){
e.eventName="MQA.TileMap.dragStart";
this.onDragStart(e);
}else{
if(_3d=="dragend"){
e.eventName="MQA.TileMap.dragEnd";
this.onDragEnd(e);
}
}
}
}else{
if(arguments.length==2){
var e=new MQA.Event();
var _3d=arguments[0];
if(_3d=="dragend"){
var _3e=arguments[1];
var _3f=MQA.Util.getParentOffset(this.parent);
e.clientX=_3e.clientX-_3f.x;
e.clientY=_3e.clientY-_3f.y;
this.endDragPoint=new MQA.Point(e.clientX,e.clientY);
e.dragDirection=this.direction(this.startDragPoint.x,this.startDragPoint.y,this.endDragPoint.x,this.endDragPoint.y);
var _40=this.endDragPoint.x-this.startDragPoint.x;
var _41=this.endDragPoint.y-this.startDragPoint.y;
var _42=this.percentage(0,0,_40,_41,false);
e.dragPercentage=Math.round(Math.sqrt(_42.shiftX*_42.shiftX+_42.shiftY*_42.shiftY));
e.eventName="MQA.TileMap.dragEnd";
this.onDragEnd(e);
}
}
}
};
MQA.TileMap.prototype.direction=function(_43,_44,_45,_46){
var _47="";
if(_46<_44){
_47="n";
}else{
if(_46>_44){
_47="s";
}
}
if(_45>_43){
_47+="e";
}else{
if(_45<_43){
_47+="w";
}
}
var _48=MQA.Util.panAngle(_43,_44,_45,_46);
if(_47=="ne"){
if(_48<22){
_47="e";
}else{
if(_48>68){
_47="n";
}
}
}else{
if(_47=="nw"){
if(_48<22){
_47="w";
}else{
if(_48>68){
_47="n";
}
}
}else{
if(_47=="se"){
if(_48<22){
_47="e";
}else{
if(_48>68){
_47="s";
}
}
}else{
if(_47=="sw"){
if(_48<22){
_47="w";
}else{
if(_48>68){
_47="s";
}
}
}
}
}
}
return _47;
};
MQA.TileMap.prototype.percentage=function(_49,_4a,_4b,_4c,_4d){
var _4e={shiftX:0,shiftY:0};
if(parseInt(_4b)>parseInt(_49)){
_4e.shiftX=parseInt(_4b)-parseInt(_49);
}else{
_4e.shiftX=parseInt(_49)-parseInt(_4b);
}
if(parseInt(_4c)>parseInt(_4a)){
_4e.shiftY=parseInt(_4c)-parseInt(_4a);
}else{
_4e.shiftY=parseInt(_4a)-parseInt(_4c);
}
if(!_4d||typeof (_4d)=="undefined"){
_4e.shiftY=MQA.Util.calcPercentage(_4e.shiftY,this.height);
_4e.shiftX=MQA.Util.calcPercentage(_4e.shiftX,this.width);
}
return _4e;
};
MQA.TileMap.prototype.onTKMouseDown=function(e){
MQA.EventManager.trigger(this,"mousedown",e);
};
MQA.TileMap.prototype.onTKMouseUp=function(e){
MQA.EventManager.trigger(this,"mouseup",e);
};
MQA.TileMap.prototype.handleMouse=function(){
if(arguments.length==2){
var _51=arguments[1];
var str="";
var e=new MQA.Event();
var _54=MQA.Util.getParentOffset(this.parent);
e.button=(MQA._prEvent.isLeftClick(_51))?MQA.BUTTON_MQ_LEFT:MQA.BUTTON_MQ_RIGHT;
e.clientX=_51.clientX-_54.x;
e.clientY=_51.clientY-_54.y;
var _55=arguments[0];
if(_55=="mousedown"){
this.startDragPoint=new MQA.Point(e.clientX,e.clientY);
if(this.surface){
this.overlaydiv.style.cursor=this.current_mousecursor;
}
e.eventName="MQA.TileMap.mouseDown";
this.onTKMouseDown(e);
}else{
if(_55=="mouseup"){
if(this.surface){
this.overlaydiv.style.cursor=this.current_mousecursor;
}
e.eventName="MQA.TileMap.mouseUp";
this.onTKMouseUp(e);
}
}
}
};
MQA.TileMap.prototype.addControl=function(_56,_57){
if(_56.controlVersion=="1.0"){
if(this.controls[_56.type]){
this.removeControl(_56);
}
_56.initialize(this);
this.controls[_56.type]=_56;
if(_57!=null){
_56.position=_57;
}
this.parent2.appendChild(_56.elem);
this.placeControl(_56);
var _58=_56.elem.style;
_58.display="block";
_58.zIndex=0;
}else{
_56.map=this;
this.controls[_56.type]=_56;
if(_57!=null){
_56.position=_57;
}
_56.draw();
}
};
MQA.TileMap.prototype.removeControl=function(_59){
this.controls[_59.type]=null;
if(_59.controlVersion=="1.0"){
if(_59.destructor){
_59.destructor();
}
}else{
_59.dispose(false);
}
};
MQA.TileMap.prototype.updateZoom=function(_5a){
if(this.controls[MQA.CONTROL_PANZOOM]!=null){
this.controls[MQA.CONTROL_PANZOOM].setZoom(this.getZoomLevel());
this.controls[MQA.CONTROL_PANZOOM].unselectZoom(0);
}
};
MQA.TileMap.prototype.placeControl=function(_5b){
var pos=_5b.getPosition();
if(_5b.controlVersion=="2.0"){
_5b.setValue("position",pos);
}else{
var _5d=pos.getMapCorner();
var _5e;
var top;
if(_5d==MQA.MapCorner.TOP_LEFT){
_5e=0;
top=0;
}else{
if(_5d==MQA.MapCorner.TOP_RIGHT){
_5e=this.width-_5b.getWidth();
top=0;
var _60=arguments;
if(typeof _60[1]=="undefined"){
pos.offsetSize.width*=-1;
}
}else{
if(_5d==MQA.MapCorner.BOTTOM_LEFT){
_5e=0;
top=this.height-_5b.getHeight();
var _60=arguments;
if(typeof _60[1]=="undefined"){
pos.offsetSize.height*=-1;
}
}else{
if(_5d==MQA.MapCorner.BOTTOM_RIGHT){
_5e=this.width-_5b.getWidth();
top=this.height-_5b.getHeight();
var _60=arguments;
if(typeof _60[1]=="undefined"){
pos.offsetSize.width*=-1;
pos.offsetSize.height*=-1;
}
}
}
}
}
_5e+=pos.offsetSize.width;
top+=pos.offsetSize.height;
_5b.elem.style.left=_5e+"px";
_5b.elem.style.top=top+"px";
}
};
MQA.TileMap.prototype.setLogoZindex=function(_61,_62){
var _63=parseInt(_61);
var _64=parseInt(_62);
var _65=this.logos[_63];
if(_65.style){
_65.style.zIndex=_64;
}
};
MQA.TileMap.prototype.setLogoPlacement=function(_66,_67){
var _68=_67.getMapCorner();
var _69=Math.abs(_67.getOffsetSize().getWidth());
var _6a=Math.abs(_67.getOffsetSize().getHeight());
var _6b=0;
var _6c=0;
if(_68==MQA.MapCorner.TOP_LEFT){
_6b=_69;
_6c=_6a;
}else{
if(_68==MQA.MapCorner.TOP_RIGHT){
_6b=(-_69);
_6c=_6a;
}else{
if(_68==MQA.MapCorner.BOTTOM_LEFT){
_6b=_69;
_6c=(-_6a);
}else{
if(_68==MQA.MapCorner.BOTTOM_RIGHT){
_6b=(-_69);
_6c=(-_6a);
}else{
return;
}
}
}
}
_66=parseInt(_66);
_68=parseInt(_68);
if(_66>=MQA.LOGO_MQ_LOGO&&_66<=MQA.LOGO_SAT_COPY&&_68>=MQA.CORNER_TOPLEFT&&_68<=MQA.CORNER_BOTTOMRIGHT){
this.logos[_66].corner=_68;
this.logos[_66].offset=new MQA.Point(_6b,_6c);
this.setLogoPosition(this.logos[_66]);
}
};
MQA.TileMap.prototype.addShapes=function(_6d){
if(_6d){
var h=_6d.getSize();
for(i=0;i<h;i++){
this.addShape(_6d.getAt(i));
}
}
};
MQA.TileMap.prototype.addShape=function(_6f,_70){
_70=(typeof (_70)=="undefined"?true:_70);
if(_6f.map){
return;
}
_6f.map=this;
if(!(_6f instanceof MQA.Poi)){
if(!this.surface){
this.createDrawingSurface();
}
if(!this.surface){
throw ("Overlay drawing surface does not exist.");
}
if(this.getDragOffset().x!=this.overlayOffsetX||this.getDragOffset().y!=this.overlayOffsetY){
this.overlayOffsetX=this.getDragOffset().x;
this.overlayOffsetY=this.getDragOffset().y;
this.overlaydiv.style.left=-(this.SURFACE_OFFSET+this.overlayOffsetX)+"px";
this.overlaydiv.style.top=-(this.SURFACE_OFFSET+this.overlayOffsetY)+"px";
this.redrawOverlays();
}
}
if(_70){
this._mapShapes.add(_6f);
}
_6f.draw();
var e=new MQA.Event("MQA.TileMap.shapeAdded");
e.shape=_6f;
this.onShapeAdded(e);
e=null;
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._addPoi=function(_72,_73,_74){
var xy=this.getLLToXY(_72);
_74.ll=_72;
_74.offset=_73;
_74.style.position="absolute";
_74.style.zIndex=90;
_74.style.left=(xy.x+_73.x-this.m_dragoffX)+"px";
_74.style.top=(xy.y+_73.y-this.m_dragoffY)+"px";
_74.oncontextmenu=MQA._prEvent.falseFunction;
this.div.poidiv.appendChild(_74);
};
MQA.TileMap.prototype.removeAllShapes=function(){
if(this.getDeclutter()){
var _76=this.getDeclutter().getDeclutterMode();
}
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(0);
}
}
while(this._mapShapes.getSize()>0){
var _77=false;
for(var x=1;x<this._shapeCollections.length;x++){
if(this._shapeCollections[x].contains(this._mapShapes.getAt(0))){
_77=true;
break;
}
}
if(!_77){
this.removeShape(this._mapShapes.getAt(0),true);
}else{
this._mapShapes._remove(0);
}
}
if(this.getDeclutter()){
if(_76!=0){
this.getDeclutter().setDeclutterMode(_76);
}
}
this.onMapCleared(new MQA.Event("MQA.TileMap.mapCleared"));
};
MQA.TileMap.prototype.createDrawingSurface=function(){
try{
if(MQA.Graphics){
this.TILESIZE=MQA.TILESIZE;
this.SURFACE_OFFSET=2*this.TILESIZE;
this.overlayOffsetX=0;
this.overlayOffsetY=0;
this.overlaydiv=document.createElement("div");
this.overlaydiv.id="mqOverlayDiv";
var _79=parseInt(this.div1.style.width);
var _7a=parseInt(this.div1.style.height);
var _7b=Math.ceil(_79/this.TILESIZE)*this.TILESIZE;
var _7c=Math.ceil(_7a/this.TILESIZE)*this.TILESIZE;
var _7d=_7b+(2*this.SURFACE_OFFSET);
var _7e=_7c+(2*this.SURFACE_OFFSET);
var _7f=-(this.SURFACE_OFFSET);
var _80=-(this.SURFACE_OFFSET);
this.overlaydiv.lt=_7f+"px";
this.overlaydiv.tp=_80+"px";
this.overlaydiv.style.position="absolute";
this.overlaydiv.style.top=_80+"px";
this.overlaydiv.style.left=_7f+"px";
this.overlaydiv.style.height=_7e+"px";
this.overlaydiv.style.width=_7d+"px";
this.overlaydiv.style.zIndex=70;
this.overlaydiv.UNSELECTABLE="on";
this.overlaydiv.style.MozUserSelect="none";
this.overlaydiv.onselectstart=MQA._prEvent.falseFunction;
this.overlaydiv.style.cursor=this.current_mousecursor;
this.overlaydiv.style.backgroundColor="transparent";
this.overlaydiv.style.background="none";
this.div.appendChild(this.overlaydiv);
this.surface=MQA.Graphics.createSurface(this.overlaydiv,_7d,_7e);
}else{
this.surface=null;
}
}
catch(err){
this.surface=null;
}
};
MQA.TileMap.prototype.createPoiDrawingSurface=function(){
try{
if(MQA.Graphics){
this.TILESIZE=MQA.TILESIZE;
this.SURFACE_OFFSET=2*this.TILESIZE;
this.poiLineOffsetX=0;
this.poiLineOffsetY=0;
this.poilinediv=document.createElement("div");
this.poilinediv.id="mqPoiLineDiv";
var _81=this.div1.style.width.replace("px","");
var _82=this.div1.style.height.replace("px","");
var _83=Math.ceil(_81/this.TILESIZE)*this.TILESIZE;
var _84=Math.ceil(_82/this.TILESIZE)*this.TILESIZE;
var _85=_83+(2*this.SURFACE_OFFSET);
var _86=_84+(2*this.SURFACE_OFFSET);
var _87=-(Math.round((_83-_81)/2)+this.SURFACE_OFFSET);
var _88=-(Math.round((_84-_82)/2)+this.SURFACE_OFFSET);
var _87=-(this.SURFACE_OFFSET);
var _88=-(this.SURFACE_OFFSET);
this.poilinediv.lt=_87+"px";
this.poilinediv.tp=_88+"px";
this.poilinediv.style.position="absolute";
this.poilinediv.style.top=_88+"px";
this.poilinediv.style.left=_87+"px";
this.poilinediv.style.height=_86+"px";
this.poilinediv.style.width=_85+"px";
this.poilinediv.style.zIndex=70;
this.poilinediv.UNSELECTABLE="on";
this.poilinediv.style.MozUserSelect="none";
this.poilinediv.onselectstart=MQA._prEvent.falseFunction;
this.poilinediv.style.cursor=this.current_mousecursor;
this.poilinediv.style.backgroundColor="transparent";
this.poilinediv.style.background="none";
this.div.appendChild(this.poilinediv);
this.poisurface=MQA.Graphics.createSurface(this.poilinediv,_85,_86);
}else{
this.poisurface=null;
}
}
catch(err){
this.poisurface=null;
}
};
MQA.TileMap.prototype.createCanvas=function(){
try{
this.TILESIZE=MQA.TILESIZE;
this.SURFACE_OFFSET=2*this.TILESIZE;
this.canvasOffsetX=0;
this.canvasOffsetY=0;
this.dcCanvasDiv=document.createElement("div");
this.dcCanvasDiv.id="mqCanvasDiv";
var _89=this.div1.style.width.replace("px","");
var _8a=this.div1.style.height.replace("px","");
var _8b=Math.ceil(_89/this.TILESIZE)*this.TILESIZE;
var _8c=Math.ceil(_8a/this.TILESIZE)*this.TILESIZE;
var _8d=_8b+(2*this.SURFACE_OFFSET);
var _8e=_8c+(2*this.SURFACE_OFFSET);
var _8f=-(Math.round((_8b-_89)/2)+this.SURFACE_OFFSET);
var _90=-(Math.round((_8c-_8a)/2)+this.SURFACE_OFFSET);
var _8f=-(this.SURFACE_OFFSET);
var _90=-(this.SURFACE_OFFSET);
this.dcCanvasDiv.style.position="absolute";
this.dcCanvasDiv.style.top=_90+"px";
this.dcCanvasDiv.style.left=_8f+"px";
this.dcCanvasDiv.style.height=_8e+"px";
this.dcCanvasDiv.style.width=_8d+"px";
this.dcCanvasDiv.style.cursor="auto";
this.dcCanvasDiv.style.zIndex=70;
this.dcCanvasDiv.UNSELECTABLE="off";
this.div.appendChild(this.dcCanvasDiv);
var c=document.createElement("canvas");
c.setAttribute("height",parseInt(this.dcCanvasDiv.style.height));
c.setAttribute("width",parseInt(this.dcCanvasDiv.style.width));
c.setAttribute("id","mqCanvas");
this.dcCanvasDiv.appendChild(c);
this.dcCanvasContext=c.getContext("2d");
}
catch(err){
this.dcCanvasDiv=null;
this.dcCanvasContext=null;
}
};
MQA.TileMap.prototype.removeShape=function(_92,_93){
if(typeof (_92)=="undefined"){
return;
}
_93=(typeof (_93)=="undefined"?true:_93);
var i,j;
if(_92.map&&!_93){
_92.dispose(false);
}
if(_93&&this._mapShapes.contains(_92)){
_92.dispose(false);
this._mapShapes.remove(this._mapShapes.getItemIndex(_92));
}
var e=new MQA.Event("MQA.TileMap.shapeRemoved");
e.shape=_92;
this.onShapeRemoved(e);
var e=new MQA.Event("MQA.Shape.removed");
_92.onRemoved(e);
};
MQA.TileMap.prototype.replaceShapes=function(_97){
var i;
this.removeAllShapes();
for(i=0;i<_97.getSize();i++){
this.addShape(_97.getAt(i));
}
};
MQA.TileMap.prototype.redrawOverlays=function(){
if(this._mapShapes.getSize()==0&&this._shapeCollections.length==1){
return;
}
var _99=this.getShapeCollections(true,true);
for(var x=0;x<_99.length;x++){
var _9b=_99[x];
var j=_9b.getSize();
for(var i=0;i<j;i++){
if(!(_9b.getAt(i).isOnMap())){
continue;
}
if(!(_9b.getAt(i) instanceof MQA.Poi)){
_9b.getAt(i).draw();
}
}
}
};
MQA.TileMap.prototype.handleOverlays=function(){
if(this.surface){
this.overlayOffsetX=this.getDragOffset().x;
this.overlayOffsetY=this.getDragOffset().y;
this.overlaydiv.style.left=-(this.SURFACE_OFFSET+this.overlayOffsetX)+"px";
this.overlaydiv.style.top=-(this.SURFACE_OFFSET+this.overlayOffsetY)+"px";
this.redrawOverlays();
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()==2){
this.getDeclutter().adjustLeaderLineSurface();
this.getDeclutter().redrawLeaderLines();
}
}
}
};
MQA.TileMap.prototype.handlePoiLines=function(){
if(this.surface){
this.poiLineOffsetX=this.getDragOffset().x;
this.poiLineOffsetY=this.getDragOffset().y;
this.poilinediv.style.left=-(this.SURFACE_OFFSET+this.poiLineOffsetX)+"px";
this.poilinediv.style.top=-(this.SURFACE_OFFSET+this.poiLineOffsetY)+"px";
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()==2){
this.getDeclutter().adjustLeaderLineSurface();
this.getDeclutter().redrawLeaderLines();
}
}
}
};
MQA.TileMap.prototype.getMapType=function(){
return this.tileMode;
};
MQA.TileMap.prototype.pixToLL=function(_9e){
var ll=this.getXYToLL(_9e);
return new MQA.LatLng(ll.lat,ll.lng);
};
MQA.TileMap.prototype.llToPix=function(_a0){
var xy=this.getLLToXY(_a0);
return new MQA.Point(xy.x,xy.y);
};
MQA.TileMap.prototype.setMapType=function(_a2,_a3){
var _a4=this.getMapType();
if(_a4!=_a2){
var _a5="";
switch(_a2){
case MQA.MAP_TYPE.MAP:
case MQA.MAP_TYPE.SAT:
case MQA.MAP_TYPE.HYB:
break;
default:
return;
}
if(_a2==MQA.MAP_TYPE.MAP||_a2==MQA.MAP_TYPE.SAT||_a2==MQA.MAP_TYPE.HYB&&(this.tileMode!=_a2)){
this.sendTransactions();
if(_a2==MQA.MAP_TYPE.MAP){
if(!this.mapLayer.tileLayerDiv){
this.addTileLayer(this.mapLayer);
}
this.mapLayer.show();
if(this.satLayer.tileLayerDiv){
this.satLayer.hide();
}
if(this.strlblbLayer.tileLayerDiv){
this.strlblbLayer.hide();
}
this.logos[MQA.LOGO_MAP_COPY].style.display="block";
this.logos[MQA.LOGO_SAT_COPY].style.display="none";
}
if(_a2==MQA.MAP_TYPE.SAT){
if(!this.satLayer.tileLayerDiv){
this.addTileLayer(this.satLayer);
}
if(this.mapLayer.tileLayerDiv){
this.mapLayer.hide();
}
if(!this.satLayer.visible){
this.satLayer.show();
}
if(this.strlblbLayer.tileLayerDiv){
this.strlblbLayer.hide();
}
this.logos[MQA.LOGO_MAP_COPY].style.display="none";
this.logos[MQA.LOGO_SAT_COPY].style.display="block";
}
if(_a2==MQA.MAP_TYPE.HYB){
if(!this.satLayer.tileLayerDiv){
this.addTileLayer(this.satLayer);
}
if(!this.strlblbLayer.tileLayerDiv){
this.addTileLayer(this.strlblbLayer);
}
if(this.mapLayer.tileLayerDiv){
this.mapLayer.hide();
}
if(!this.satLayer.visible){
this.satLayer.show();
}
this.strlblbLayer.show();
this.logos[MQA.LOGO_MAP_COPY].style.display="block";
this.logos[MQA.LOGO_SAT_COPY].style.display="block";
}
this.tileMode=_a2;
_a3=(typeof (_a3)=="undefined")?false:_a3;
if(!_a3){
var _a6=this.getCenterLatLng();
this.centerlat=_a6.lat;
this.centerlng=_a6.lng;
this.rebuildTiles();
}
}
this.redrawOverlays();
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()==2){
this.getDeclutter().resetDraggedPois();
this.getDeclutter().redrawLeaderLines();
}
}
if(this.controls[MQA.CONTROL_TYPE]!=null){
this.controls[MQA.CONTROL_TYPE].updateControl(_a2);
}
var evt=new MQA.Event("MQA.TileMap.mapTypeChanged");
evt.prevMapType=_a4;
evt.mapType=_a2;
this.onMapTypeChanged(evt);
}
};
MQA.TileMap.prototype.zoomIn=function(){
var _a8=this.getZoomLevel();
_a8++;
this.setZoomLevel(_a8);
};
MQA.TileMap.prototype.zoomOut=function(){
var _a9=this.getZoomLevel();
_a9--;
this.setZoomLevel(_a9);
};
MQA.TileMap.prototype.setZoomLevel=function(_aa){
var _ab=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_ab;
this.onZoomStart(evt);
this._setZoomLevel(_aa);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_ab;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._setZoomLevel=function(_ae){
_ae=parseInt(_ae);
if(_ae<1||_ae>16||this.drag||this.slide||_ae==this.zoom){
return;
}
var _af=this.getCenterLatLng();
this.sendTransactions();
this.centerlat=_af.lat;
this.centerlng=_af.lng;
this.zoom=_ae;
this.scale=MQA.SCALES[this.zoom];
this.rebuildTiles();
};
MQA.TileMap.prototype.getZoomLevel=function(){
return this.zoom;
};
MQA.TileMap.prototype.zoomToRect=function(_b0,_b1,_b2,_b3){
var _b4=this.getZoomLevel();
if(_b1==null){
_b1=false;
}
if(_b2==null){
_b2=1;
}
if(_b3==null){
_b3=16;
}
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_b4;
this.onZoomStart(evt);
this.updateZoom("off");
this._bestFit(_b0,_b1,_b2,_b3);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_b4;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype.getScale=function(){
return this.getScaleFromZoom(this.getZoomLevel());
};
MQA.TileMap.prototype.getScaleFromZoom=function(_b7){
var i=(_b7)?(((_b7>=1)&&(_b7<=16))?_b7:0):0;
return MQA.SCALES[i];
};
MQA.TileMap.prototype.bestFit=function(_b9,_ba,_bb){
var _bc=this.getZoomLevel();
if(_b9==null){
_b9=false;
}
if(_ba==null){
_ba=1;
}
if(_bb==null){
_bb=16;
}
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_bc;
this.onZoomStart(evt);
this.updateZoom("off");
var _be=this.getShapes(true).getBoundingRect();
var _bf=this.getShapeCollections(true,true);
var i=0;
while(!_be){
_be=_bf[i].getBoundingRect();
i++;
}
if(!_be){
return;
}
for(var x=1;x<_bf.length;x++){
_be.extend(_bf[x].getBoundingRect().getUpperLeft());
_be.extend(_bf[x].getBoundingRect().getLowerRight());
}
this._bestFit(_be,_b9,_ba,_bb);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_bc;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
if(this.getDeclutter()){
if(this.getDeclutter().getDeclutterMode()!=0){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
}
};
MQA.TileMap.prototype._bestFit=function(_c3,_c4,_c5,_c6){
var _c7,_c8,_c9,_ca,_cb,_cc;
if(_c4==null){
_c4=false;
}
if(_c5==null){
_cb=1;
}else{
_c5=parseInt(_c5);
if(_c5<1||_c5>15){
_cb=1;
}else{
_cb=_c5+1;
}
}
if(_c6==null){
_cc=16;
}else{
_c6=parseInt(_c6);
if(_c6<1||_c6>16){
_cc=16;
}else{
_cc=_c6;
}
if(_cc<_cb){
_cc=_cb+1;
}
}
if(_c3.ul.x){
_c7=new MQA.PointXY(_c3.ul.x,_c3.ul.y);
_c8=new MQA.PointXY(_c3.lr.x,_c3.lr.y);
_c9=this.getXYToLL(new MQA.PointXY(_c3.ul.x,_c3.ul.y));
_ca=this.getXYToLL(new MQA.PointXY(_c3.lr.x,_c3.lr.y));
}else{
_c7=this.getLLToXY(new MQA.PointLL(_c3.ul.lat,_c3.ul.lng));
_c8=this.getLLToXY(new MQA.PointLL(_c3.lr.lat,_c3.lr.lng));
_c9=new MQA.PointLL(_c3.ul.lat,_c3.ul.lng);
_ca=new MQA.PointLL(_c3.lr.lat,_c3.lr.lng);
}
var _cd=Math.abs(_ca.lng-_c9.lng)*(MQA.PIXERSPERLNGDEGREE/this.scale);
var _ce=Math.abs(_ca.lat-_c9.lat)*(MQA.PIXERSPERLATDEGREE/this.scale);
if(_c4==true){
var _cf=this.getCenterLatLng();
var _d0=Math.max(Math.abs(_cf.lng-_c9.lng),Math.abs(_cf.lng-_ca.lng));
var _d1=Math.max(Math.abs(_cf.lat-_c9.lat),Math.abs(_cf.lat-_ca.lat));
_cd=(_d0*2)*(MQA.PIXERSPERLNGDEGREE/this.scale);
_ce=(_d1*2)*(MQA.PIXERSPERLNGDEGREE/this.scale);
}
var _d2=(this.bestFitMargin<(this.width/2)&&this.bestFitMargin<(this.height/2)?this.bestFitMargin:Math.round(Math.min(((this.width/2)-1),((this.height/2)-1))));
var _d3=Math.max((this.scale*(_cd/(this.width-(_d2*2)))),(this.scale*(_ce/(this.height-(_d2*2)))));
while(_d3<MQA.SCALES[_cb]&&_cb<=_cc){
_cb++;
}
if(_c4==true){
this._setZoomLevel((_cb-1));
}else{
this.setCenterLatLngZoomLevel(new MQA.PointLL(((_c9.lat+_ca.lat)/2),((_c9.lng+_ca.lng)/2)),(_cb-1));
}
};
MQA.TileMap.prototype.bestFitLL=function(_d4,_d5,_d6,_d7){
if(!_d4.length){
return;
}
if(_d5==null){
_d5=false;
}
if(_d6==null){
_d6=1;
}
if(_d7==null){
_d7=16;
}
var _d8=new MQA.RectLL(_d4[0],_d4[0]);
_d8.setBounds(_d4);
this.zoomToRect(_d8,_d5,_d6,_d7);
};
MQA.TileMap.prototype.getCenter=function(){
var ll=this.getCenterLatLng();
return new MQA.LatLng(ll.lat,ll.lng);
};
MQA.TileMap.prototype.setCenter=function(_da,_db){
if(_db==null){
this.setCenterLatLng(_da);
}else{
var _dc=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_dc;
this.onZoomStart(evt);
this.updateZoom("off");
this.setCenterLatLngZoomLevel(_da,_db);
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_dc;
e.zoom=this.getZoomLevel();
this.onZoomEnd(e);
}
if(this.getDeclutter()){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
if(this.surface){
this.redrawOverlays();
}
};
MQA.TileMap.prototype.panToLatLng=function(_df){
var pnt=this.llToPix(_df);
if((pnt.getX()>-100&&pnt.getX()<this.width+100)||(pnt.getY()>-100&&pnt.getY()<this.height+100)){
this.slideMapToPoint(pnt);
}else{
this.setCenter(_df);
}
};
MQA.TileMap.prototype.getRolloverWindow=function(){
return this.rolloverwindow;
};
MQA.TileMap.prototype.getInfoWindow=function(){
return this.infowindow;
};
MQA.TileMap.prototype.setInfoTitleHTML=function(_e1){
var _e2=document.createElement("div");
_e2.innerHTML="<div>"+_e1+"</div>";
this.infoWindowTitle=_e2;
};
MQA.TileMap.prototype.setInfoContentHTML=function(_e3){
var _e4=document.createElement("div");
_e4.innerHTML="<div>"+_e3+"</div>";
this.infoWindowContent=_e4;
};
MQA.TileMap.prototype.setInfoTitleElement=function(_e5){
this.infoWindowTitle=_e5;
};
MQA.TileMap.prototype.setInfoContentElement=function(_e6){
this.infoWindowContent=_e6;
};
MQA.TileMap.prototype.openInfoWindow=function(_e7){
this.div.appendChild(this.infowindow.popup);
var _e8=this.getDragOffset();
_e7.x-=_e8.x;
_e7.y-=_e8.y;
this.infowindow.modify(_e7,this.infoWindowTitle,this.infoWindowContent,new MQA.Point(-7,-14));
this.infowindow.setOpenerAndShow(this);
this.onInfoWindowOpen(new MQA.Event("MQA.TileMap.infoWindowOpen"));
};
MQA.TileMap.prototype.setRolloversEnabled=function(_e9){
this.rolloversEnabled=_e9;
};
MQA.TileMap.prototype.getRolloversEnabled=function(){
return this.rolloversEnabled;
};
MQA.TileMap.prototype.enableDragging=function(_ea){
this.disabled=(!_ea==true);
};
MQA.TileMap.prototype.getDragEnabled=function(){
return !this.disabled;
};
MQA.TileMap.prototype.getShapes=function(_eb){
_eb=(typeof (_eb)!="undefined"?_eb:false);
var _ec=new MQA.ShapeCollection;
for(var i=0,j=this._mapShapes.getSize();i<j;i++){
var _ef=this._mapShapes.getAt(i);
var _f0=((_eb&&(_ef instanceof MQA.Poi))||!_eb);
if(_f0){
_ec.add(_ef,false);
}
}
return _ec;
};
MQA.TileMap.prototype._getAllShapes=function(_f1){
_f1=(typeof (_f1)!="undefined"?_f1:false);
var _f2=new MQA.ShapeCollection;
var _f3=this.getShapeCollections(true,true);
for(var x=0;x<_f3.length;x++){
for(var i=0,j=_f3[x].getSize();i<j;i++){
var _f7=_f3[x].getAt(i);
var _f8=((_f1&&(_f7 instanceof MQA.Poi))||!_f1);
if(_f8){
_f2.add(_f7,false);
}
}
}
return _f2;
};
MQA.TileMap.prototype.getSize=function(){
return new MQA.Size(this.div1.style.width,this.div1.style.height);
};
MQA.TileMap.prototype.setSize=function(_f9){
if(typeof (_f9)=="undefined"){
var _f9={};
}
var w=(typeof (_f9.width)=="undefined")?this.parent2.clientWidth:_f9.width;
var h=(typeof (_f9.height)=="undefined")?this.parent2.clientHeight:_f9.height;
var _fc=new MQA.Size(w,h);
if(_fc.width==this.width&&_fc.height==this.height){
return;
}
if(this.mapLayer.tiles){
this.mapLayer.removeAllTiles();
this.mapLayer.tileLayerDiv=null;
}
if(this.satLayer.tiles){
this.satLayer.removeAllTiles();
this.satLayer.tileLayerDiv=null;
}
if(this.strlblbLayer.tiles){
this.strlblbLayer.removeAllTiles();
this.strlblbLayer.tileLayerDiv=null;
}
var _fd=this.getCenterLatLng();
this.width=parseInt(_fc.width);
this.height=parseInt(_fc.height);
if(this.width>MQA.MAXMAPWIDTH){
this.width=MQA.MAXMAPWIDTH;
}
if(this.height>MQA.MAXMAPHEIGHT){
this.height=MQA.MAXMAPHEIGHT;
}
this.centerlat=_fd.lat;
this.centerlng=_fd.lng;
this.maprows=Math.ceil(this.height/this.tilesize)+2;
this.mapcols=Math.ceil(this.width/this.tilesize)+2;
this.drag=false;
this.slide=false;
this.parent.style.width=this.width+"px";
this.parent.style.height=this.height+"px";
var j=this.logos.length;
for(i=0;i<j;i++){
this.setLogoPosition(this.logos[i]);
}
if(this.showOurMaps){
this.div.ldiv.style.width=(this.mapcols*MQA.TILESIZE)+"px";
this.div.ldiv.style.height=(this.maprows*MQA.TILESIZE)+"px";
}
this.sendTransactions();
this.rebuildTiles();
var _ff=this.getDeclutter().getDeclutterMode();
if(_ff!=0){
this.getDeclutter().setDeclutterMode(0);
this.getDeclutter().setDeclutterMode(_ff);
}
this.redrawOverlays();
for(var x=0,y=this.controls.length;x<y;x++){
if(this.controls[x]){
this.placeControl(this.controls[x],true);
}
}
};
MQA.TileMap.prototype.getRectFromMapState=function(_102){
try{
var _103=new MQMapState();
_103=null;
}
catch(e){
throw "The JSAPI must be included to use this function.";
return;
}
if(_102==null){
return;
}
var cLat=parseFloat(_102.getCenter().getLatitude());
var cLng=parseFloat(_102.getCenter().getLongitude());
var _106=_102.getHeightPixels();
var _107=_102.getWidthPixels();
var _108=_102.getMapScale();
var _109=(_106/2)/(MQA.PIXERSPERLATDEGREE/_108);
var _10a=(_107/2)/(MQA.PIXERSPERLNGDEGREE/_108);
_109=parseInt(_109*1000000)/1000000;
_10a=parseInt(_10a*1000000)/1000000;
var ul=new MQA.LatLng(cLat+_109,cLng-_10a);
var lr=new MQA.LatLng(cLat-_109,cLng+_10a);
return new MQA.RectLL(ul,lr);
};
MQA.TileMap.prototype.addRouteHighlight=function(_10d,_10e,_10f,_110,_111,_112,_113){
var _114=this.getZoomLevel();
var evt=new MQA.Event("MQA.TileMap.zoomStart");
evt.zoom=_114;
this.onZoomStart(evt);
this.updateZoom("off");
this.routerect=_10d;
this.rteserver=_10e;
if(_10f==null){
this.rtesession="";
}else{
this.rtesession=_10f.toString();
}
if(this.routerect.ul.lat<this.routerect.lr.lat){
var _116=this.routerect.ul.lat;
this.routerect.ul.lat=this.routerect.lr.lat;
this.routerect.lr.lat=_116;
}
if(this.routerect.ul.lng>this.routerect.lr.lng){
var _117=this.routerect.ul.lng;
this.routerect.ul.lng=this.routerect.lr.lng;
this.routerect.lr.lng=_117;
}
this.showRte=true;
if(_110==null||_110==false){
this.getNewRouteHighlight();
}else{
if(_111==null){
_111=false;
}
if(_112==null){
_112=1;
}
if(_113==null){
_113=16;
}
this.bestFitRoute(_111,_112,_113);
}
this.updateZoom("on");
var e=new MQA.Event("MQA.TileMap.zoomEnd");
e.prevZoom=_114;
e.zoom=this.getZoomLevel();
if(e.prevZoom!=e.zoom){
this.onZoomEnd(e);
}
if(this.getDeclutter()){
this.getDeclutter().setDeclutterMode(this.getDeclutter().getDeclutterMode());
}
};
MQA.TileMap.prototype.removeRouteHighlight=function(){
this.showRte=false;
this.routerect=null;
this.rtehighlight.style.display="none";
this.rtesession="";
};
MQA.TileMap.prototype.getRouteSession=function(){
return this.rtesession;
};
MQA.TileMap.prototype.getBounds=function(){
var ulLL=this.pixToLL(new MQA.Point(0,0));
var lrLL=this.pixToLL(new MQA.Point(this.div1.style.width,this.div1.style.height));
return new MQA.RectLL(ulLL,lrLL);
};
MQA.TileMap.prototype.restoreState=function(){
this.setCenter(this.savedCenter);
this.setZoomLevel(this.savedZoomLevel);
this.setMapType(this.savedMapType);
};
MQA.TileMap.prototype.saveState=function(){
this.savedCenter=this.getCenter();
this.savedZoomLevel=this.getZoomLevel();
this.savedMapType=this.getMapType();
};
MQA.TileMap.prototype.getDeclutter=function(){
return this.mydeclutter;
};
MQA.TileMap.prototype.showDraggableMap=function(){
this.getPoiDiv().style.zIndex=90;
if(MQA.browser.name=="safari"&&this.dcCanvasDiv){
this.dcCanvasDiv.style.zIndex=70;
}
this.div1.style.zIndex=0;
if(this.staticMapEnabled){
}
if(this.getRouteSession()!=""){
var _11b=(this.bestFitRect!=null)?this.bestFitRect:this.routerect;
this.addRouteHighlight(_11b,this.rteserver,this.getRouteSession(),this.routebestfit);
}
};
MQA.TileMap.prototype.showDragableMap=function(){
this.showDraggableMap();
};
MQA.TileMap.prototype.showStaticMap=function(){
this.div1.style.zIndex=100;
this.setLogoZindex(MQA.MapLogo.MAPQUEST_COPYRIGHT,-100);
this.setLogoZindex(MQA.MapLogo.MAPQUEST,-100);
this.setLogoZindex(MQA.MapLogo.SCALES,-100);
this.setLogoZindex(MQA.MapLogo.ICUBED_COPYRIGHT,-100);
this.setLogoZindex(MQA.MapLogo.NAVTEQ_COPYRIGHT,-100);
this.turnEventsOff=true;
var _11c={type:this.getMapType(),size:this.getSize().toString(),scale:this.getScale(),center:this.getCenter(),key:Key};
if(this.getRouteSession()!=""){
_11c.session=this.getRouteSession();
}
if(IsDotCom){
this.getPoiDiv().style.zIndex=-100;
if(MQA.browser.name=="safari"&&this.dcCanvasDiv){
this.dcCanvasDiv.style.zIndex=-100;
}
this.getDeclutter().removeLeaderLines();
_11c.stops=_11c.pois="";
var _11d=this.getPois();
for(var i=0,j=_11d.getSize();i<j;i++){
var _120=_11d.getAt(i);
var _121=(_120.dragLeft==null)?0:((-1*_120.dragLeft)-_120.mqMapIcon.getAnchorOffset().getX());
var _122=(_120.dragTop==null)?0:((-1*_120.dragTop)-_120.mqMapIcon.getAnchorOffset().getY());
switch(_120.getKey()){
case "mcenter":
case "scenter":
case "ecenter":
case "pcenter":
_11c[_120.getKey()]=_120.getLatLng().toString()+","+_121+","+_122;
break;
default:
var _123=_120.getKey().split("-");
switch(_123[0]){
case "stops":
case "pois":
_11c[_123[0]]+=_123[1].toUpperCase()+","+_120.getLatLng().toString()+","+_121+","+_122+"|";
break;
}
break;
}
}
}
var _124=MQA.getStaticMapResources()+"?";
for(var nv in _11c){
_124+=(_11c[nv]!="")?nv+"="+_11c[nv]+"&":"";
}
_124+"rand="+(Math.round((Math.random()*10000)));
if(this.staticMapImg){
var _126=this.staticMapImg.src;
if(_126.split("&rand=")[0]==_124.split("&rand=")[0]){
this.staticMapImg.style.display="block";
this.staticMapEnabled=true;
return _126;
}
}
var _127=this.getSize().toString().split(",");
var _128=this.getStaticMapDiv();
_128.style.top=(0-this.getDragOffset().y)+"px";
_128.style.left=(0-this.getDragOffset().x)+"px";
if(!this.staticMapImg){
this.staticMapImg=document.createElement("img");
this.staticMapImg.className="map-static";
this.staticMapImg.style.position="absolute";
this.staticMapImg.style.top="0";
this.staticMapImg.style.left="0";
this.staticMapImg.style.border="none";
this.staticMapImg.style.display="block";
this.staticMapImg.alt="";
_128.appendChild(this.staticMapImg);
}
this.staticMapImg.style.width=_127[0]+"px";
this.staticMapImg.style.height=_127[1]+"px";
this.staticMapImg.src=_124;
this.staticMapImg.style.display="block";
this.staticMapEnabled=true;
};
MQA.TileMap.prototype.hideStaticMap=function(){
if(!this.staticMapEnabled){
return;
}
this.turnEventsOff=false;
if(!(this.mapLayer==null)){
this.showDraggableMap();
}
if(this.staticMapImg){
this.staticMapImg.style.display="none";
this.div1.style.zIndex=0;
this.getPoiDiv().style.zIndex=90;
if(MQA.browser.name=="safari"&&this.dcCanvasDiv){
this.dcCanvasDiv.style.zIndex=70;
}
this.setLogoZindex(MQA.MapLogo.MAPQUEST_COPYRIGHT,22);
this.setLogoZindex(MQA.MapLogo.MAPQUEST,22);
this.setLogoZindex(MQA.MapLogo.SCALES,22);
this.setLogoZindex(MQA.MapLogo.ICUBED_COPYRIGHT,22);
this.setLogoZindex(MQA.MapLogo.NAVTEQ_COPYRIGHT,22);
this.getDeclutter().redrawLeaderLines();
}
this.staticMapEnabled=false;
};
MQA.TileMap.prototype.setBestFitMargin=function(_129){
this.bestFitMargin=_129;
};
MQA.TileMap.prototype.getBestFitMargin=function(){
return this.bestFitMargin;
};
MQA.TileMap.prototype.dispose=function(){
this.sendTransactions(true);
this.brokerKey=null;
this.infowindow.dispose();
this.infowindow=null;
this.iwparent=MQA.Util._deleteDOMObject(this.iwparent);
this.infoWindowTitle=null;
this.infoWindowContent=null;
this.rolloverwindow.dispose();
this.rolloverwindow=null;
var _12a;
while(this._mapShapes.getSize()){
_12a=this.getShapes().getAt(0);
this._mapShapes.remove(0);
_12a.dispose(true);
_12a=null;
}
this._mapShapes=null;
if(this.overlaydiv){
if(typeof (MQA.Graphics)!="undefined"){
switch(MQA.Graphics.drawMethod){
case "svg":
case "canvas":
break;
case "vml":
MQA.Graphics.vmlNamespace=MQA.Util._deleteDOMObject(MQA.Graphics.vmlNamespace);
break;
}
}
this.overlaydiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.overlaydiv);
MQA.Util._deleteDOMObject(this.overlaydiv);
this.overlaydiv=null;
}
this.traffic=null;
this.div.poidiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div.poidiv);
MQA.Util._deleteDOMObject(this.div.poidiv);
this.div.poidiv=null;
if(this.surface){
this.surface=MQA.Util._deleteDOMObject(this.surface);
}
if(this.poisurface){
this.poisurface=MQA.Util._deleteDOMObject(this.poisurface);
}
if(this.dcCanvasDiv){
this.dcCanvasDiv=MQA.Util._deleteDOMObject(this.dcCanvasDiv);
}
this.mapShadowTop=MQA.Util._deleteDOMObject(this.mapShadowTop);
this.mapShadowLeft=MQA.Util._deleteDOMObject(this.mapShadowLeft);
this.rtehighlight.onload=null;
MQA._prEvent.stopObserving(document,"mousemove",this.eMouseMove);
MQA._prEvent.stopObserving(document,"mouseup",this.eMouseUp);
MQA._prEvent.stopObserving(document,"mouseout",this.eMouseOut);
MQA._prEvent.stopObserving(this.parent,"mouseover",this.eMouseOver);
MQA._prEvent.stopObserving(this.parent,"mousedown",this.eMouseDown);
MQA._prEvent.stopObserving(this.div1,"click",this.eClick);
MQA._prEvent.stopObserving(this.div1,"dblclick",this.eDoubleClick);
this.eMouseMove=null;
this.eMouseUp=null;
this.eMouseOut=null;
this.eMouseOver=null;
this.eMouseDown=null;
this.eClick=null;
this.eDoubleClick=null;
for(var ci=0;ci<this.controls.length;ci++){
if(typeof (this.controls[ci]!="undefined")&&this.controls[ci]!=null){
this.controls[ci].dispose();
this.controls[ci]=null;
}
}
for(var i=0;i<this.logos.length;i++){
this.logos[i].src="";
if(i==1){
this.logos[i].innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.logos[i]);
}
MQA.Util._deleteDOMObject(this.logos[i]);
this.logos[i]=null;
}
this.logos=null;
this.loading=MQA.Util._deleteDOMObject(this.loading);
this.maptiler=MQA.Util._deleteDOMObject(this.maptiler);
this.hybtiler=MQA.Util._deleteDOMObject(this.hybtiler);
this.sattiler=MQA.Util._deleteDOMObject(this.sattiler);
this.rtehighlight=MQA.Util._deleteDOMObject(this.rtehighlight);
this.satLayer.dispose();
this.satLayer=null;
this.strlblbLayer.dispose();
this.strlblbLayer=null;
this.mapLayer.dispose();
this.mapLayer=null;
var TL;
for(var i=0;i<this.tileLayers.getSize();i++){
TL=this.tileLayers.getAt(i);
TL.dispose();
TL=null;
}
this.tileLayers=null;
this.prnstyle=MQA.Util._deleteDOMObject(this.prnstyle);
if(this.showOurMaps){
this.div.ldiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div.ldiv);
MQA.Util._deleteDOMObject(this.div.ldiv);
this.div.ldiv=null;
}
this.div.staticmapdiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div.staticmapdiv);
MQA.Util._deleteDOMObject(this.div.staticmapdiv);
this.div.staticmapdiv=null;
this.div.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div);
MQA.Util._deleteDOMObject(this.div);
this.div=null;
this.div1.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.div1);
MQA.Util._deleteDOMObject(this.div1);
this.div1=null;
this.parent.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.parent);
MQA.Util._nukeChildren(this.parent);
this.parent=null;
MQA.Util._nukeChildren(this.parent2);
this.parent2=null;
MQA.Util._purge(this);
};
MQA.TileMap.prototype.getZoom=function(RECT,_12f,_130,_131,_132,SIZE){
var SIZE=(typeof (SIZE)!="undefined")?SIZE:this.getSize();
if(_130==null){
_130=false;
}
if(_131==null){
_131=1;
}else{
_131=parseInt(_131);
if(_131<1||_131>15){
_131=1;
}
}
if(_132==null){
_132=16;
}else{
_132=parseInt(_132);
if(_132<1||_132>16){
_132=16;
}
if(_132<_131){
_132=_131+1;
}
}
var zoom=_131;
var _135=_132;
var _136=new MQA.PointFloatXY((RECT.ul.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(RECT.ul.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _137=new MQA.PointFloatXY((RECT.lr.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(RECT.lr.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _138=new MQA.PointLL(RECT.ul.lat,RECT.ul.lng);
var _139=new MQA.PointLL(RECT.lr.lat,RECT.lr.lng);
var _13a=Math.abs(_139.lng-_138.lng)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]);
var _13b=Math.abs(_139.lat-_138.lat)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]);
if(_130==true){
var ptXY=new MQA.PointFloatXY((_12f.lng+180)*(MQA.PIXERSPERLNGDEGREE/MQA.SCALES[zoom]),(_12f.lat+90)*(MQA.PIXERSPERLATDEGREE/MQA.SCALES[zoom]));
var _13d=Math.max(Math.abs(ptXY.x-_136.x),Math.abs(ptXY.x-_137.x));
var _13e=Math.max(Math.abs(ptXY.y-_136.y),Math.abs(ptXY.y-_137.y));
_13a=_13d*2;
_13b=_13e*2;
}
var _13f=(this.bestFitMargin<(SIZE.width/2)&&this.bestFitMargin<(SIZE.height/2)?this.bestFitMargin:Math.round(Math.min(((SIZE.width/2)-1),((SIZE.height/2)-1))));
var _140=Math.max((MQA.SCALES[zoom]*(_13a/(SIZE.width-(_13f*2)))),(MQA.SCALES[zoom]*(_13b/(SIZE.height-(_13f*2)))));
if(_140>MQA.SCALES[zoom]){
return zoom;
}
while(_140<MQA.SCALES[zoom]&&zoom<=_135){
zoom++;
}
return zoom-1;
};
MQA.TileMap.prototype.rebuildTiles=function(_141){
this.lastlat=this.centerlat;
this.lastlng=this.centerlng;
this.m_centerX=MQA.getColTile(this.centerlng,this.scale);
this.m_centerY=MQA.getRowTile(this.centerlat,this.scale);
this.m_offsetX=MQA.getColTileOffset(this.centerlng,this.scale);
this.m_offsetY=this.tilesize-MQA.getRowTileOffset(this.centerlat,this.scale);
this.m_intoffX=Math.floor(this.m_offsetX);
this.m_intoffY=Math.floor(this.m_offsetY);
this.m_layoffX=parseInt(this.width/2)-this.m_intoffX;
this.m_layoffY=parseInt(this.height/2)-this.m_intoffY;
this.m_shiftX=0;
this.m_shiftY=0;
while(this.m_layoffX<0){
this.m_layoffX+=this.tilesize;
this.m_shiftX--;
this.m_centerX++;
}
while(this.m_layoffY<0){
this.m_layoffY+=this.tilesize;
this.m_shiftY--;
this.m_centerY--;
}
while(this.m_layoffX>2*this.tilesize){
this.m_layoffX-=this.tilesize;
this.m_shiftX++;
this.m_centerX--;
}
while(this.m_layoffY>2*this.tilesize){
this.m_layoffY-=this.tilesize;
this.m_shiftY++;
this.m_centerY++;
}
this.m_tileofX=this.m_layoffX;
this.m_tileofY=this.m_layoffY;
while(this.m_tileofX>this.tilesize){
this.m_tileofX-=this.tilesize;
}
while(this.m_tileofY>this.tilesize){
this.m_tileofY-=this.tilesize;
}
this.m_dragoffX=0;
this.m_dragoffY=0;
this.m_tileoffX=0;
this.m_tileoffY=0;
this.m_routeoffX=0;
this.m_routeoffY=0;
this.m_transoffX=0;
this.m_transoffY=0;
this.m_scrollofX=0;
this.m_scrollofY=0;
this.diffaccum=0;
this.div.lt=0;
this.div.tp=0;
this.div.style.left=this.div.lt+"px";
this.div.style.top=this.div.tp+"px";
_141=(typeof (_141)=="undefined")?false:_141;
if((this.mapLayer.tiles==null)&&(this.satLayer.tiles==null)&&(this.strlblbLayer.tiles==null)&&(this.showOurMaps)){
if(this.tileMode==MQA.MAP_TYPE.MAP){
this.addTileLayer(this.mapLayer);
}
if(this.tileMode==MQA.MAP_TYPE.SAT){
this.addTileLayer(this.satLayer);
}
if(this.tileMode==MQA.MAP_TYPE.HYB){
this.addTileLayer(this.satLayer);
this.addTileLayer(this.strlblbLayer);
}
}else{
if(this.satLayer.tiles){
this.satLayer.isViewableTilesDrawn=false;
this.satLayer.isLayerDrawn=false;
}
if(this.strlblbLayer.tiles){
this.strlblbLayer.isViewableTilesDrawn=false;
this.strlblbLayer.isLayerDrawn=false;
}
if(this.mapLayer.tiles){
this.mapLayer.isViewableTilesDrawn=false;
this.mapLayer.isLayerDrawn=false;
}
for(var x=0;x<this.tileLayers.getSize();x++){
this.tileLayers.getAt(x).setAllLoadingTiles();
}
for(var x=0;x<this.tileLayers.getSize();x++){
if(x==0&&this.satLayer.tiles&&this.showOurMaps){
if(this.satLayer.visible){
this.tileLayers.getAt(x).rebuildTiles();
}
}
if(x==1&&this.strlblbLayer.tiles&&this.showOurMaps){
if(this.strlblbLayer.visible){
this.tileLayers.getAt(x).rebuildTiles();
}
}
if(x==2&&this.mapLayer.tiles&&this.showOurMaps){
if(this.mapLayer.visible){
this.tileLayers.getAt(x).rebuildTiles();
}
}
if(x>2){
this.tileLayers.getAt(x).rebuildTiles();
}
}
}
if(this.showOurMaps){
var tp=0;
var lt=0;
if(this.mapLayer.tiles){
tp=this.mapLayer.tiles[0][0].x;
lt=this.mapLayer.tiles[0][0].y;
}else{
if(this.satLayer.tiles){
tp=this.satLayer.tiles[0][0].x;
lt=this.satLayer.tiles[0][0].y;
}else{
if(this.strlblbLayer.tiles){
tp=this.strlblbLayer.tiles[0][0].x;
lt=this.strlblbLayer.tiles[0][0].y;
}
}
}
this.div.ldiv.tp=tp;
this.div.ldiv.lt=lt;
this.div.ldiv.style.top=MQA.Util.asPix(this.div.ldiv.tp);
this.div.ldiv.style.left=MQA.Util.asPix(this.div.ldiv.lt);
}
this.logos[MQA.LOGO_MQ_SCALES].childNodes[0].style.marginTop=-((this.zoom-1)*parseInt(this.logos[MQA.LOGO_MQ_SCALES].height))+"px";
this.logos[MQA.LOGO_MAP_COPY].src=MQA.RESOURCES+MQA.VENDORLIST[MQA.MAPVENDORS[this.zoom]];
if(this.mapLayer.visible){
this.mapaccum1+=1;
this.mapaccum2+=1;
}
if(this.satLayer.visible){
this.sataccum1+=1;
this.sataccum2+=1;
}
if(this.strlblbLayer.visible){
this.hybaccum1+=1;
this.hybaccum2+=1;
}
if(this.showRte){
this.rtehighlight.style.display="none";
this.getNewRouteHighlight();
}
if(!_141&&this._getAllShapes(true).getSize()!=0){
this.updatePois();
}
};
MQA.TileMap.prototype.setLogoPosition=function(LOGO){
var LEFT;
var TOP;
if(LOGO.corner==MQA.CORNER_TOPLEFT){
LEFT=0;
TOP=0;
}else{
if(LOGO.corner==MQA.CORNER_TOPRIGHT){
LEFT=this.width-parseInt(LOGO.width);
TOP=0;
}else{
if(LOGO.corner==MQA.CORNER_BOTTOMLEFT){
LEFT=0;
TOP=this.height-parseInt(LOGO.height);
}else{
if(LOGO.corner==MQA.CORNER_BOTTOMRIGHT){
LEFT=this.width-parseInt(LOGO.width);
TOP=this.height-parseInt(LOGO.height);
}
}
}
}
LEFT+=LOGO.offset.x;
TOP+=LOGO.offset.y;
LOGO.style.left=LEFT+"px";
LOGO.style.top=TOP+"px";
};
MQA.TileMap.prototype.sendTransactions=function(_148){
if(this.showOurMaps){
if(this.mapLayer.visible&&this.mapaccum1>0){
this.maptiler.src=MQA.PROTOCOL+"//"+LOGSERVER+"/tilelog/transaction?transaction=log&t=m&c="+(parseInt(this.mapaccum1*1000000)/1000000)+"&c2="+(parseInt(this.mapaccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.mapaccum1=0;
this.mapaccum2=0;
}
if(this.satLayer.visible&&this.sataccum1>0){
this.sattiler.src=MQA.PROTOCOL+"//"+LOGSERVER+"/tilelog/transaction?transaction=log&t=a&c="+(parseInt(this.sataccum1*1000000)/1000000)+"&c2="+(parseInt(this.sataccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.sataccum1=0;
this.sataccum2=0;
}
if(this.strlblbLayer.visible&&this.hybaccum1>0){
this.hybtiler.src=MQA.PROTOCOL+"//"+LOGSERVER+"/tilelog/transaction?transaction=log&t=h&c="+(parseInt(this.hybaccum1*1000000)/1000000)+"&c2="+(parseInt(this.hybaccum2*1000000)/1000000)+"&s="+this.scale+"&lat="+this.lastlat+"&lng="+this.lastlng+"&key="+Key+"&rand="+Math.floor(Math.random()*99991);
this.hybaccum1=0;
this.hybaccum2=0;
}
}
this.m_transoffX=0;
this.m_transoffY=0;
if(_148!=null&&_148==true){
MQA.Util.pause(250);
}
};
MQA.TileMap.prototype.getNewRouteHighlight=function(){
var _149=MQA.getRowTile(this.routerect.ul.lat,this.scale);
var _14a=MQA.getColTile(this.routerect.ul.lng,this.scale);
var _14b=MQA.getRowTile(this.routerect.lr.lat,this.scale);
var _14c=MQA.getColTile(this.routerect.lr.lng,this.scale);
this.rteoffset=-1;
this.rtethresh=2;
if(this.mapLayer==null){
this.rebuildTiles();
}
var _14d=0;
var _14e=0;
var _14f=this.getCurrentTileLayer();
_14d=_14f.tiles[0][0];
_14e=_14f.tiles[this.mapcols-1][this.maprows-1];
if(_14a>_14d.gridColumn&&_149<_14d.gridRow&&_14c<_14e.gridColumn&&_14b>_14e.gridRow){
this.rteoffset=0;
this.rtethresh=-1;
_14d=_14f.tiles[_14a-_14d.gridColumn][_14d.gridRow-_149];
_14e=_14f.tiles[this.mapcols-1-(_14e.gridColumn-_14c)][this.maprows-1-(_14b-_14e.gridRow)];
}
var _150=MQA.getLatTileRowOffset(_14d.gridRow+this.rteoffset*-1,255,this.scale);
var _151=MQA.getLngTileColOffset(_14d.gridColumn-1+this.rteoffset*1,255,this.scale);
var _152=MQA.getLatTileRowOffset(_14e.gridRow-1+this.rteoffset*1,255,this.scale);
var _153=MQA.getLngTileColOffset(_14e.gridColumn+this.rteoffset*-1,255,this.scale);
var WDTH=(1+(_14e.gridColumn+this.rteoffset*-1)-(_14d.gridColumn+this.rteoffset*1))*this.tilesize;
var HGHT=(1+(_14d.gridRow+this.rteoffset*-1)-(_14e.gridRow+this.rteoffset*1))*this.tilesize;
this.m_routeoffX=0;
this.m_routeoffY=0;
if(this.zoom<3&&_151>0&&this.centerlng<0){
_151-=360;
}
var _156=!((_151>this.routerect.lr.lng)||(_153<this.routerect.ul.lng)||(_152>this.routerect.ul.lat)||(_150<this.routerect.lr.lat));
if(this.rteoffset==0||_156){
this.rtehighlight.lt=(_14d.x+this.rteoffset*this.tilesize+1);
this.rtehighlight.tp=(_14d.y+this.rteoffset*this.tilesize+1);
this.rtehighlight.style.left=this.rtehighlight.lt+"px";
this.rtehighlight.style.top=this.rtehighlight.tp+"px";
this.rtehighlight.style.width=WDTH+"px";
this.rtehighlight.style.height=HGHT+"px";
if(this.rtesession.length>0){
var CLAT=(_150+_152)/2;
var CLNG=(_151+_153)/2;
this.rtehighlight.src=this.rteserver+"/?e=0&GetMapFromUpdatedSession.1=1280:"+this.rtesession+",1270:2,1190:,rtehl,"+CLAT+","+CLNG+","+(WDTH/72)+","+(HGHT/72)+","+this.scale+",1050:6,nodata,1062:1537,,,Visible+False,1062:1577,,,Visible+False,1062:1578,,,Visible+False,1062:764,,,Visible+False,1062:1279,,,polygon+brush+style+solid+color+224%2c224%2c224,1062:765,,,Visible+True+Line+Pen+Style+Solid+Size+150+Color+255%2c0%2c0+Opacity+255+CasePen+Style+Solid+Size+210+Color+255%2c255%2c255+Opacity+255,1650.1:77,72,1,1400.2:,,,"+"&rand="+Math.floor(Math.random()*99991);
}else{
this.rtehighlight.src=this.rteserver+"&latul="+_150+"&lngul="+_151+"&latlr="+_152+"&lnglr="+_153+"&width="+WDTH+"&height="+HGHT+"&scale="+this.scale+"&rand="+Math.floor(Math.random()*99991);
}
}
};
MQA.TileMap.prototype.showRouteHighlight=function(){
this.rtehighlight.style.display="block";
};
MQA.TileMap.prototype.scrollMap=function(SX,SY){
this.moving=true;
if(SX!=0||SY!=0){
this.handleMove("move");
}
if((SX!=0||SY!=0)&&this.drag){
this.handleDrag("drag");
}
this.m_dragoffX+=SX;
this.m_dragoffY+=SY;
this.m_tileoffX+=SX;
this.m_tileoffY+=SY;
this.m_scrollofX+=SX;
this.m_scrollofY+=SY;
this.div.lt=this.div.lt+SX;
this.div.tp=this.div.tp+SY;
this.div.style.left=this.div.lt+"px";
this.div.style.top=this.div.tp+"px";
var y=this.tileLayers.getSize();
for(var x=0;x<y;x++){
if(this.tileLayers.getAt(x).visible){
this.tileLayers.getAt(x).scrollLayer();
}
}
var _15d=0;
while(this.m_tileoffX+this.m_tileofX>MQA.TILESIZE){
this.m_tileoffX-=this.tilesize;
this.m_routeoffX--;
this.m_transoffX--;
_15d+=(this.maprows-2);
if(this.showOurMaps){
this.div.ldiv.lt-=MQA.TILESIZE;
this.div.ldiv.style.left=MQA.Util.asPix(this.div.ldiv.lt);
}
}
while(this.m_tileoffX+this.m_tileofX<0){
this.m_tileoffX+=this.tilesize;
this.m_routeoffX++;
this.m_transoffX++;
_15d+=(this.maprows-2);
if(this.showOurMaps){
this.div.ldiv.lt+=MQA.TILESIZE;
this.div.ldiv.style.left=MQA.Util.asPix(this.div.ldiv.lt);
}
}
while(this.m_tileoffY+this.m_tileofY>MQA.TILESIZE){
this.m_tileoffY-=this.tilesize;
this.m_routeoffY--;
this.m_transoffY--;
_15d+=(this.mapcols-2);
if(this.showOurMaps){
this.div.ldiv.tp-=MQA.TILESIZE;
this.div.ldiv.style.top=MQA.Util.asPix(this.div.ldiv.tp);
}
}
while(this.m_tileoffY+this.m_tileofY<0){
this.m_tileoffY+=this.tilesize;
this.m_routeoffY++;
this.m_transoffY++;
_15d+=(this.mapcols-2);
if(this.showOurMaps){
this.div.ldiv.tp+=MQA.TILESIZE;
this.div.ldiv.style.top=MQA.Util.asPix(this.div.ldiv.tp);
}
}
if(this.m_dragoffX>1*MQA.MODS[this.zoom]*this.tilesize){
this.m_dragoffX-=MQA.MODS[this.zoom]*this.tilesize;
}
if(this.m_dragoffX<-1*MQA.MODS[this.zoom]*this.tilesize){
this.m_dragoffX+=MQA.MODS[this.zoom]*this.tilesize;
}
if(_15d>0){
_15d=_15d/((this.mapcols-2)*(this.maprows-2)*9);
if(this.mapLayer.visible){
this.mapaccum1+=_15d;
}
if(this.satLayer.visible){
this.sataccum1+=_15d;
}
if(this.strlblbLayer.visible){
this.hybaccum1+=_15d;
}
}
if(Math.abs(this.m_transoffY)>4||Math.abs(this.m_transoffX)>4){
this.sendTransactions();
}
var _15e=Math.abs(this.m_dragoffX)%MQA.SURFACE_OFFSET;
var _15f=Math.abs(this.m_dragoffY)%MQA.SURFACE_OFFSET;
var _160=Math.ceil(MQA.SURFACE_OFFSET/1.5);
if((_15e>_160)&&this.updateOverlaysX){
this.handleOverlays();
if(this.traffic){
this.handleTraffic();
}
this.updateOverlaysX=false;
}
if((_15f>_160)&&this.updateOverlaysY){
this.handleOverlays();
if(this.traffic){
this.handleTraffic();
}
this.updateOverlaysY=false;
}
if(_15e<_160&&!this.updateOverlaysX){
this.updateOverlaysX=true;
}
if(_15f<_160&&!this.updateOverlaysY){
this.updateOverlaysY=true;
}
if(this.showRte&&(this.rtethresh>0)&&(this.m_routeoffY>=this.rtethresh||this.m_routeoffY<=this.rtethresh*-1||this.m_routeoffX>=this.rtethresh||this.m_routeoffX<=this.rtethresh*-1)){
this.rtehighlight.style.display="none";
this.getNewRouteHighlight();
}
};
MQA.TileMap.prototype.slideMapTimer=function(_161,_162,_163,_164,_165,_166,_167,_168){
var pc=_166/_167;
var dx=parseInt(pc*_164)-_162;
var dy=parseInt(pc*_165)-_163;
this.scrollMap(dx,dy);
_162+=dx;
_163+=dy;
_166++;
if(_166<=_167){
setTimeout("MQA.MASTER_BROKER.DoSlide( "+_161+", "+_162+", "+_163+", "+_164+", "+_165+", "+_166+", "+_167+", "+_168+" );",_168);
}else{
this.slide=false;
this.moving=false;
this.handleMove("moveend");
}
};
MQA.TileMap.prototype.isPoi=function(_16c){
if(this._mapShapes.getSize()==0){
return false;
}
return (_16c instanceof MQA.Poi);
};
MQA.TileMap.prototype.onMouseMove=function(_16d){
if(this.startingToMove){
this.startingToMove=false;
this.handleMove("movestart");
}
if(this.startingToDrag){
this.startingToDrag=false;
this.handleDrag("dragstart");
}
this.click=false;
if(this.draggedObject){
this.draggedObject.shape.style.left=this.draggedObject.shapeStartX+(_16d.clientX-this.draggedObject.mouseStartX)+"px";
this.draggedObject.shape.style.top=this.draggedObject.shapeStartY+(_16d.clientY-this.draggedObject.mouseStartY)+"px";
if(this.draggedObject.mqrw&&!this.draggedObject.mqrw.isHidden()&&(Math.abs(this.draggedObject.mouseStartX-_16d.clientX)>3||Math.abs(this.draggedObject.mouseStartY-_16d.clientY)>3)&&!this.getDeclutter().keepRolloversOnDrag){
this.draggedObject.mqrw.hide();
}
}
if(!this.drag||this.disabled){
return;
}
var _16e=MQA.Util.getParentOffset(this.parent);
var cx=_16d.clientX-_16e.x;
var cy=_16d.clientY-_16e.y;
var gx=parseInt(this.width/2)-cx;
var gy=parseInt(this.height/2)-cy;
this.lastlat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY+gy,this.scale);
this.lastlng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX-this.m_dragoffX-gx,this.scale);
var difX=cx-this.lastX;
var difY=cy-this.lastY;
this.lastX=cx;
this.lastY=cy;
this.scrollMap(difX,difY);
};
MQA.TileMap.prototype.onMouseUp=function(_175){
var _176=(this.getDeclutter()?this.getDeclutter().getDeclutterablePois():new MQA.ShapeCollection());
var _177=(this.getDeclutter()?this._getAllShapes(true):new MQA.ShapeCollection());
if(this.draggedObject&&_177.contains(this.draggedObject)&&this.draggedObject.isDragging){
this.draggedObject.mqrw.hide();
this.draggedObject.finishDrag();
}
if(!this.drag||this.disabled){
return;
}
this.current_mousecursor=this.grab_mousecursor;
this.div.style.cursor=this.current_mousecursor;
if(!this.click){
var xdif=Math.abs(this.m_scrollofX-this.startX);
var ydif=Math.abs(this.m_scrollofY-this.startY);
this.diffaccum+=((xdif*ydif)+((this.width-xdif)*ydif)+((this.height-ydif)*xdif));
var _17a=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.mapLayer.visible&&_17a){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.satLayer.visible&&_17a){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.strlblbLayer.visible&&_17a){
this.hybaccum2+=1;
this.diffaccum=0;
}
}
var _17b=MQA.Util.getParentOffset(this.parent);
_175.cx=_175.clientX-_17b.x;
_175.cy=_175.clientY-_17b.y;
this.startingToMove=false;
if(this.moving){
this.moving=false;
this.handleMove("moveend");
}
this.startingToDrag=false;
if(this.drag&&!this.click){
this.handleDrag("dragend",_175);
}
this.handleMouse("mouseup",_175);
MQA._prEvent.stop(_175);
this.drag=false;
};
MQA.TileMap.prototype.onMouseOver=function(_17c){
this.div.style.cursor=this.current_mousecursor;
};
MQA.TileMap.prototype.onMouseDown=function(_17d){
this.click=true;
if(this.slide||this.disabled){
return;
}
if(this.isPoi(MQA._prEvent.element(_17d))){
return;
}
var _17e=MQA.Util.getParentOffset(this.parent);
this.current_mousecursor=this.grabbing_mousecursor;
this.div.style.cursor=this.current_mousecursor;
var cx=_17d.clientX-_17e.x;
var cy=_17d.clientY-_17e.y;
this.startX=this.m_scrollofX;
this.startY=this.m_scrollofY;
this.lastX=cx;
this.lastY=cy;
this.drag=true;
this.startingToMove=true;
this.startingToDrag=true;
_17d.cx=cx;
_17d.cy=cy;
this.handleMouse("mousedown",_17d);
MQA._prEvent.stop(_17d);
};
MQA.TileMap.prototype.onMouseOut=function(_181){
if(!_181.relatedTarget&&!_181.toElement){
this.onMouseUp(_181);
}
};
MQA.TileMap.prototype.onDblClick=function(_182){
this.handleClickEvent(_182,false);
};
MQA.TileMap.prototype.handleClickEvent=function(_183,_184){
if(this.drag||this.slide||(!this.click&&_184)){
return;
}
this.click=false;
this.div.style.cursor="default";
var _185=MQA.Util.getParentOffset(this.parent);
var cx=(_183.pageX||(_183.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)))-_185.x;
var cy=(_183.pageY||(_183.clientY+(document.documentElement.scrollTop||document.body.scrollTop)))-_185.y;
if(this.clickOper==MQA.OPER_RECENTER||this.zoom==16){
this.slideMapToPoint(new MQA.PointXY(cx,cy));
}else{
var ptLL=this.getXYToLL(new MQA.PointXY(cx,cy));
this.setCenterLatLngZoomLevel(ptLL,this.zoom+1);
}
this.div.style.cursor=this.current_mousecursor;
};
MQA.TileMap.prototype.onWheelMouse=function(_189){
if(this.drag){
return;
}
if(_189.wheelDelta>0&&this.zoom<16){
this.zoomIn();
}
if(_189.wheelDelta<0&&this.zoom>1){
this.zoomOut();
}
};
MQA.TileMap.prototype.onKeyDown=function(_18a){
if(this.drag){
return;
}
key=_18a.which?_18a.which:_18a.keyCode;
if(key==107&&this.zoom<16){
this.zoomIn();
}
if(key==109&&this.zoom>1){
this.zoomOut();
}
};
MQA.TileMap.prototype.slideMapByOffset=function(PTXY){
if(this.slide){
return;
}
this.handleMove("movestart");
this.slide=true;
var _18c=PTXY.x,_18d=PTXY.y,_18e=this.brokerKey;
setTimeout(function(){
MQA.MASTER_BROKER.DoSlide(_18e,0,0,_18c,_18d,1,MQA.SLIDESTEPS,MQA.SLIDEDELAY);
},MQA.SLIDEDELAY);
var xdif=Math.abs(PTXY.x);
var ydif=Math.abs(PTXY.y);
this.diffaccum+=((xdif*ydif)+((this.width-xdif)*ydif)+((this.height-ydif)*xdif));
var _191=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.mapLayer.visible&&_191){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.satLayer.visible&&_191){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.strlblbLayer.visible&&_191){
this.hybaccum2+=1;
this.diffaccum=0;
}
};
MQA.TileMap.prototype.slideMapToPoint=function(PTXY){
if(this.slide){
return;
}
this.handleMove("movestart");
var gx=parseInt(this.width/2)-PTXY.x;
var gy=parseInt(this.height/2)-PTXY.y;
this.slide=true;
var _195=this.brokerKey;
setTimeout(function(){
MQA.MASTER_BROKER.DoSlide(_195,0,0,gx,gy,1,MQA.SLIDESTEPS,MQA.SLIDEDELAY);
},MQA.SLIDEDELAY);
var xdif=Math.abs(gx);
var ydif=Math.abs(gy);
this.diffaccum+=((xdif*ydif)+((this.width-xdif)*ydif)+((this.height-ydif)*xdif));
var _198=((this.diffaccum/(this.width*this.height))>=0.4);
if(this.mapLayer.visible&&_198){
this.mapaccum2+=1;
this.diffaccum=0;
}
if(this.satLayer.visible&&_198){
this.sataccum2+=1;
this.diffaccum=0;
}
if(this.strlblbLayer.visible&&_198){
this.hybaccum2+=1;
this.diffaccum=0;
}
};
MQA.TileMap.prototype.panNorth=function(_199){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2),parseInt(this.height/2)-parseInt(this.height*(_199/100))));
};
MQA.TileMap.prototype.panSouth=function(_19a){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2),parseInt(this.height/2)+parseInt(this.height*(_19a/100))));
};
MQA.TileMap.prototype.panEast=function(_19b){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_19b/100)),parseInt(this.height/2)));
};
MQA.TileMap.prototype.panWest=function(_19c){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_19c/100)),parseInt(this.height/2)));
};
MQA.TileMap.prototype.panNorthWest=function(_19d){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_19d/100)),parseInt(this.height/2)-parseInt(this.height*(_19d/100))));
};
MQA.TileMap.prototype.panSouthWest=function(_19e){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)-parseInt(this.width*(_19e/100)),parseInt(this.height/2)+parseInt(this.height*(_19e/100))));
};
MQA.TileMap.prototype.panNorthEast=function(_19f){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_19f/100)),parseInt(this.height/2)-parseInt(this.height*(_19f/100))));
};
MQA.TileMap.prototype.panSouthEast=function(_1a0){
this.slideMapToPoint(new MQA.PointXY(parseInt(this.width/2)+parseInt(this.width*(_1a0/100)),parseInt(this.height/2)+parseInt(this.height*(_1a0/100))));
};
MQA.TileMap.prototype.setCenterLatLng=function(LL){
this.centerlat=parseInt(LL.lat*1000000)/1000000;
this.centerlng=parseInt(LL.lng*1000000)/1000000;
this.sendTransactions();
this.rebuildTiles();
};
MQA.TileMap.prototype.setCenterLatLngZoomLevel=function(LL,ZOOM){
ZOOM=parseInt(ZOOM);
this.centerlat=parseInt(LL.lat*1000000)/1000000;
this.centerlng=parseInt(LL.lng*1000000)/1000000;
if(ZOOM<1){
ZOOM=1;
}
if(ZOOM>16){
ZOOM=16;
}
this.zoom=ZOOM;
this.scale=MQA.SCALES[ZOOM];
this.sendTransactions();
this.rebuildTiles();
};
MQA.TileMap.prototype.setCenterXY=function(XY){
var gx=parseInt(this.width/2)-XY.x;
var gy=parseInt(this.height/2)-XY.y;
this.centerlat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY+gy,this.scale);
this.centerlng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX+this.m_dragoffX-gx,this.scale);
this.sendTransactions();
this.rebuildTiles();
};
MQA.TileMap.prototype.getCenterLatLng=function(){
var ll=new MQA.PointLL(0,0);
ll.lat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY,this.scale);
ll.lng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX-this.m_dragoffX,this.scale);
return ll;
};
MQA.TileMap.prototype.getLLToXY=function(LL){
var xy=new MQA.PointXY(0,0);
var _1aa=MQA.getColTile(LL.lng,this.scale);
var _1ab=MQA.getRowTile(LL.lat,this.scale);
var _1ac=MQA.getColTileOffset(LL.lng,this.scale);
var _1ad=this.tilesize-MQA.getRowTileOffset(LL.lat,this.scale);
xy.x=parseInt(this.width/2)-((this.m_centerX+this.m_shiftX-_1aa)*this.tilesize)-(this.m_offsetX-this.m_dragoffX-_1ac);
xy.y=parseInt(this.height/2)+((this.m_centerY-this.m_shiftY-_1ab)*this.tilesize)-(this.m_offsetY-this.m_dragoffY-_1ad);
xy.x=parseInt(xy.x);
xy.y=parseInt(xy.y);
return xy;
};
MQA.TileMap.prototype.getXYToLL=function(XY){
var gx=parseInt(this.width/2)-XY.x;
var gy=parseInt(this.height/2)-XY.y;
var ll=new MQA.PointLL(0,0);
ll.lat=MQA.getLatTileRowOffset(this.m_centerY-this.m_shiftY,this.tilesize-this.m_offsetY+this.m_dragoffY+gy,this.scale);
ll.lng=MQA.getLngTileColOffset(this.m_centerX+this.m_shiftX,this.m_offsetX-this.m_dragoffX-gx,this.scale);
return ll;
};
MQA.TileMap.prototype.updatePois=function(){
if(this._mapShapes.getSize()==0&&this._shapeCollections.length==1){
return;
}
var _1b2=this.getZoomLevel();
var _1b3=this.getShapeCollections(true,true);
for(var x=0;x<_1b3.length;x++){
var _1b5=_1b3[x];
if(_1b5.getAt(0)&&!(_1b5.getAt(0).map)){
continue;
}
var j=_1b5.getSize();
for(var i=0;i<j;i++){
var _1b8=_1b5.getAt(i);
if(_1b8 instanceof MQA.Poi){
var _1b9=(_1b2>=_1b8.minZoomLevel&&_1b2<=_1b8.maxZoomLevel);
var _1ba=_1b8.getValue("visible");
_1b8.setValue("visible",_1b9);
_1b8.visible=_1ba;
var _1bb=_1b8._getCurrentInfo();
var xy=this.llToPix(_1b8.getValue("latLng"));
_1b8.shape.style.left=(xy.x+_1bb.offset.x)+"px";
_1b8.shape.style.top=(xy.y+_1bb.offset.y)+"px";
}
}
}
};
MQA.TileMap.prototype.updateShapeCollections=function(){
var _1bd=this.getShapeCollections(false,true);
var _1be=this.getZoomLevel();
for(var i=0;i<_1bd.length;i++){
if(_1bd[i].getMinZoomLevel()>_1be||_1bd[i].getMaxZoomLevel()<_1be){
if(!this.getInfoWindow().isHidden()){
this.infowindow.hide();
}
var _1c0=this.getDeclutter().getDeclutterMode();
if(_1c0!=0){
this.getDeclutter().setDeclutterMode(0);
}
for(var k=0;k<_1bd[i].getSize();k++){
if(!(_1bd[i].getAt(k).isOnMap())){
continue;
}
this.removeShape(_1bd[i].getAt(k),false);
}
if(_1c0!=0){
this.getDeclutter().setDeclutterMode(_1c0);
}
}else{
var _1c0=this.getDeclutter().getDeclutterMode();
if(_1c0!=0){
this.getDeclutter().setDeclutterMode(0);
}
for(var k=0;k<_1bd[i].getSize();k++){
this.addShape(_1bd[i].getAt(k),false);
}
if(_1c0!=0){
this.getDeclutter().setDeclutterMode(_1c0);
}
}
}
};
MQA.TileMap.prototype.getLoadingDiv=function(){
return this.div.ldiv;
};
MQA.TileMap.prototype.getStaticMapDiv=function(){
return this.div.staticmapdiv;
};
MQA.TileMap.prototype.getOverlayDiv=function(){
return this.div.overlaydiv;
};
MQA.TileMap.prototype.getPoiDiv=function(){
return this.div.poidiv;
};
MQA.TileMap.prototype.bestFitRoute=function(_1c2,_1c3,_1c4){
if(this.routerect){
if(_1c2==null){
_1c2=false;
}
if(_1c3==null){
_1c3=1;
}
if(_1c4==null){
_1c4=16;
}
this._bestFit(this.routerect,_1c2,_1c3,_1c4);
}
};
MQA.TileMap.prototype.addShapeCollection=function(_1c5){
_1c5.map=this;
this._shapeCollections.push(_1c5);
var _1c6=this.getZoomLevel();
if(_1c6>_1c5.getMaxZoomLevel()||_1c6<_1c5.getMinZoomLevel()){
return;
}
var _1c7=0;
if(this.getDeclutter()&&_1c5.getSize()>0){
_1c7=this.getDeclutter().getDeclutterMode();
if(_1c7!=0){
this.getDeclutter().setDeclutterMode(0);
}
}
for(var i=0;i<_1c5.getSize();i++){
this.addShape(_1c5.getAt(i),false);
}
if(_1c7!=0){
this.getDeclutter().setDeclutterMode(_1c7);
}
};
MQA.TileMap.prototype.removeShapeCollection=function(_1c9){
var _1ca=this.getShapeCollection(_1c9);
if(_1ca){
var _1cb=0;
if(this.getDeclutter()&&_1ca.getSize()>0){
_1cb=this.getDeclutter().getDeclutterMode();
if(_1cb!=0){
this.getDeclutter().setDeclutterMode(0);
}
}
for(var i=0;i<_1ca.getSize();i++){
var _1cd=false;
for(var x=0;x<this._shapeCollections.length;x++){
if(this._shapeCollections[x].contains(_1ca.getAt(i))&&this._shapeCollections[x].guid!=_1ca.guid){
_1cd=true;
break;
}
}
if(!_1cd){
this.removeShape(_1ca.getAt(i),false);
}
}
for(var i=0;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].guid==_1ca.guid){
this._shapeCollections.splice(i,1);
break;
}
}
_1ca.map=null;
if(_1cb!=0){
this.getDeclutter().setDeclutterMode(_1cb);
}
return true;
}else{
return false;
}
};
MQA.TileMap.prototype.replaceShapeCollection=function(_1cf,_1d0){
var _1d1=this.getShapeCollection(_1d0);
if(_1d1){
this.removeShapeCollection(_1d0);
this.addShapeCollection(_1cf);
return true;
}else{
return false;
}
};
MQA.TileMap.prototype.getShapeCollection=function(_1d2){
var _1d3=null;
for(var i=0;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].getName()==_1d2){
_1d3=this._shapeCollections[i];
break;
}
}
return _1d3;
};
MQA.TileMap.prototype.getShapeCollections=function(_1d5,_1d6){
var _1d5=(typeof (_1d5)=="undefined"?false:_1d5);
var _1d6=(typeof (_1d6)=="undefined"?false:_1d6);
var _1d7=(_1d5?0:1);
var _1d8=[];
for(var i=_1d7;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].getName().substr(0,4)!="mqa."||_1d6){
_1d8.push(this._shapeCollections[i]);
}
}
return _1d8;
};
MQA.TileMap.prototype.getShapeCollectionNames=function(_1da,_1db){
var _1da=(typeof (_1da)=="undefined"?false:_1da);
var _1db=(typeof (_1db)=="undefined"?false:_1db);
var _1dc=(_1da?0:1);
var _1dd=[];
for(var i=_1dc;i<this._shapeCollections.length;i++){
if(this._shapeCollections[i].getName().substr(0,4)!="mqa."||_1db){
_1dd.push(this._shapeCollections[i].getName());
}
}
return _1dd;
};
MQA.TileMap.prototype.getShapeCollectionCount=function(_1df,_1e0){
var _1e1;
var _1df=(typeof (_1df)=="undefined"?false:_1df);
var _1e0=(typeof (_1e0)=="undefined"?false:_1e0);
_1e1=this.getShapeCollectionNames(_1df,_1e0).length;
return _1e1;
};
MQA.TileMap.prototype.getShapeByKey=function(key){
var _1e3=false;
for(var x=0;x<this._shapeCollections.length;x++){
for(var i=0;i<this._shapeCollections[x].getSize();i++){
if(key==this._shapeCollections[x].getAt(i).getValue("key")){
_1e3=this._shapeCollections[x].getAt(i);
break;
}
}
if(_1e3){
break;
}
}
if(_1e3){
return _1e3;
}else{
return false;
}
};
MQA.TileMap.prototype.setMapShadowState=function(b){
if(b){
this.mapShadowLeft.style.display="block";
this.mapShadowTop.style.display="block";
}else{
this.mapShadowLeft.style.display="none";
this.mapShadowTop.style.display="none";
}
};
MQA.TileMap.prototype.getMapShadowState=function(){
return (this.mapShadowLeft.style.display=="block");
};
MQA.TileMap.prototype.getByKey=function(key,_1e8){
var _1e9=null;
var _1e8=(typeof (_1e8)=="undefined"?false:_1e8);
var _1ea=this.getShapeCollections(true,_1e8);
for(var i=0;i<_1ea.length;i++){
for(var k=0;k<_1ea[i].getSize();k++){
if(_1ea[i].getAt(k).getValue("key")==key){
_1e9=_1ea[i].getAt(k);
break;
}
}
if(_1e9){
break;
}
}
return _1e9;
};
MQA.TileMap.prototype.addPoi=function(poi){
this.addShape(poi);
};
MQA.TileMap.prototype.removePoi=function(poi){
this.removeShape(poi);
};
MQA.TileMap.prototype.addOverlay=function(_1ef){
this.addShape(_1ef);
};
MQA.TileMap.prototype.removeOverlay=function(_1f0){
this.removeShape(_1f0);
};
MQA.TileMap.prototype.getCurrentTileLayer=function(){
if(this.tileMode==MQA.MAP_TYPE.MAP){
return this.mapLayer;
}else{
if(this.tileMode==MQA.MAP_TYPE.SAT){
return this.satLayer;
}else{
if(this.tileMode==MQA.MAP_TYPE.HYB){
return this.strlblbLayer;
}
}
}
};

MQA.SlideBroker=function(){
this.mapList=new Array();
};
MQA.SlideBroker.prototype={addListener:function(_1){
var _2=this.mapList.length;
this.mapList[_2]=_1;
return _2;
},DoSlide:function(_3,_4,_5,_6,_7,_8,_9,_a){
this.mapList[_3].slideMapTimer(_3,_4,_5,_6,_7,_8,_9,_a);
}};

MQA.BaseTile=function(_1,_2,_3,_4,_5,_6,_7,_8,_9){
this.parent=_1;
this.size=_8;
this.gridColumn=_4;
this.gridRow=_5;
this.x=_2;
this.y=_3;
this.opacity=_9;
this.scale=_6;
this.zoom=_7;
this.isDrawing=false;
this.isDrawn=false;
this.isLoading=false;
this.eTileDrawn=MQA._prEvent.EventCallback(this,"onTileDrawn");
this.getUrl=function(){
};
this.draw=function(){
},this.show=function(){
},this.hide=function(){
},this.updateTile=function(_a,_b,_c,_d,_e,_f){
},this.isPng=function(){
return false;
},this.loadingTile=function(){
},this.dispose=function(){
};
this.onTileDrawn=function(){
};
};
MQA.ImageTile=function(_10,_11,top,_13,_14,_15,_16,_17,_18,_19){
MQA.BaseTile.call(this,_10,_11,top,_13,_14,_15,_16,_17,_18,_19);
this.tileImageImg=null;
this.visible=true;
this.isVisible=function(){
return this.visible;
};
this.setVisible=function(_1a){
this.visible=_1a;
};
this._setShowing=function(){
if(this.visible){
this.show();
}else{
this.hide();
}
};
this._createImageObject=function(url){
this.tileImageImg.image=MQA.Util.createImage(url,this.x,this.y,this.size,this.size,0);
this.tileImageImg.image.onload=MQA._prEvent.hitch(this,"_setShowing");
this.tileImageImg.image.id="tileImg";
MQA._prEvent.observe(this.tileImageImg.image,"load",this.eTileDrawn);
if(MQA.browser.name=="msie"&&this.isPng()&&(this.opacity>0.99)){
if(MQA.browser.version<7){
this.tileImageImg.image.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.tileImageImg.image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"', sizingMethod='scale') ";
}
}else{
if(MQA.browser.name=="msie"){
this.tileImageImg.image.style.filter="alpha(opacity="+(this.opacity*100)+")";
}
}
this.tileImageImg.image.style.MozOpacity=this.opacity;
this.tileImageImg.image.style.opacity=this.opacity;
this.parent.tileLayerDiv.appendChild(this.tileImageImg.image);
this.hide();
};
this.loadingTile=function(){
this.isLoading=true;
var _1c=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
if(!this.tileImageImg){
this._createImageObject(_1c);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_1c;
}
};
this.draw=function(){
this.isDrawing=true;
this.isDrawn=false;
this.isLoading=false;
if(this.tileImageImg==null){
this.tileImageImg=new MQA.Image();
}
var _1d=this.getUrl();
var _1e=((this.parent.tileId==MQA.TILE_LAYER_ID.SAT)||(this.parent.tileId==MQA.TILE_LAYER_ID.HYB)||(this.parent.tileId==MQA.TILE_LAYER_ID.MAP))?true:false;
if(this.tileImageImg.image==null){
this._createImageObject(_1d);
}else{
this.tileImageImg.image.src=_1d;
if(this.tileImageImg.image.style.opacity!=this.opacity){
if(MQA.browser.name=="msie"&&this.isPng()&&(this.opacity>0.99)){
if(MQA.browser.version<7){
this.tileImageImg.image.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.tileImageImg.image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_1d+"', sizingMethod='scale') ";
}
}else{
if(MQA.browser.name=="msie"){
this.tileImageImg.image.style.filter="alpha(opacity="+(this.opacity*100)+")";
}
}
this.tileImageImg.image.style.MozOpacity=this.opacity;
this.tileImageImg.image.style.opacity=this.opacity;
}
}
if(MQA.browser.name=="msie"){
this._setShowing();
}
};
this.dispose=function(){
MQA._prEvent.stopObserving(this.tileImageImg.image,"load",this.eTileDrawn);
this.tileImageImg.image.onload=null;
this.tileImageImg.image=MQA.Util._deleteDOMObject(this.tileImageImg.image);
this.tileImageImg.innerHTML=null;
this.tileImageImg=null;
this.parent=null;
};
this.show=function(){
this.tileImageImg.image.style.visibility="visible";
this.tileImageImg.image.style.display="block";
this.visible=true;
};
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
this.visible=false;
};
this.updateTile=function(_1f,top,_21,_22,_23,_24){
this.isDrawing=true;
this.isDrawn=false;
this.isLoading=false;
var _25=parseInt(_21/1000);
var _26=parseInt(_22/1000);
this.x=_1f;
this.y=top;
this.gridColumn=_21;
this.gridRow=_22;
this.scale=_23;
this.zoom=_24;
while(_21<0){
_21+=MQA.MODS[_24];
}
while(_21>=MQA.MODS[_24]){
_21-=MQA.MODS[_24];
}
_25=parseInt(_21/1000);
_26=parseInt(_22/1000);
var _27=this.getUrl();
this.tileImageImg.image.src=_27;
if(MQA.browser.name=="msie"&&this.isPng()&&(this.opacity>0.99)){
if(MQA.browser.version<7){
this.tileImageImg.image.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.tileImageImg.image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+_27+"', sizingMethod='scale') ";
}
}
this.tileImageImg.image.lt=this.x;
this.tileImageImg.image.tp=this.y;
this.tileImageImg.image.style.left=MQA.Util.asPix(this.x);
this.tileImageImg.image.style.top=MQA.Util.asPix(this.y);
};
this.onTileDrawn=function(e){
if(this.isLoading){
return;
}
this.isDrawing=false;
this.isDrawn=true;
this.parent.onTileDrawn(this);
MQA._prEvent.stop(e);
};
};
MQA.MapImageTile=function(_29,_2a,top,_2c,_2d,_2e,_2f,_30,_31,_32){
MQA.ImageTile.call(this,_29,_2a,top,_2c,_2d,_2e,_2f,_30,_31,_32);
this.url=MQA.PROTOCOL+"//%1/map/Scale%2/%3/%4/%5/%6.gif";
this.show=function(){
this.tileImageImg.image.style.visibility="visible";
this.tileImageImg.image.style.display="block";
};
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
};
this.getUrl=function(){
var X=this.gridColumn;
var Y=this.gridRow;
var _35=parseInt(this.gridColumn/1000);
var _36=parseInt(this.gridRow/1000);
while(X<0){
X+=MQA.MODS[this.zoom];
}
while(X>=MQA.MODS[this.zoom]){
X-=MQA.MODS[this.zoom];
}
_35=parseInt(X/1000);
_36=parseInt(Y/1000);
return this.url.replace(/%1/,MAPSERVER[X%MAPSERVER.length]).replace(/%2/,this.scale).replace(/%3/,_36).replace(/%4/,(Y-_36*1000)).replace(/%5/,_35).replace(/%6/,(X-_35*1000));
};
this.loadingTile=function(){
this.isLoading=true;
var _37=MQA.RESOURCES+"loading.gif";
if(!this.tileImageImg){
this._createImageObject(_37);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_37;
}
};
};
MQA.StrlblImageTile=function(_38,_39,top,_3b,_3c,_3d,_3e,_3f,_40,_41){
MQA.ImageTile.call(this,_38,_39,top,_3b,_3c,_3d,_3e,_3f,_40,_41);
this.url=MQA.PROTOCOL+"//%1/hyb/Scale%2/%3/%4/%5/%6.gif";
this.show=function(){
this.tileImageImg.image.style.visibility="visible";
this.tileImageImg.image.style.display="block";
};
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
};
this.getUrl=function(){
var X=this.gridColumn;
var Y=this.gridRow;
var _44=parseInt(this.gridColumn/1000);
var _45=parseInt(this.gridRow/1000);
while(X<0){
X+=MQA.MODS[this.zoom];
}
while(X>=MQA.MODS[this.zoom]){
X-=MQA.MODS[this.zoom];
}
_44=parseInt(X/1000);
_45=parseInt(Y/1000);
return this.url.replace(/%1/,MAPSERVER[X%MAPSERVER.length]).replace(/%2/,this.scale).replace(/%3/,_45).replace(/%4/,(Y-_45*1000)).replace(/%5/,_44).replace(/%6/,(X-_44*1000));
};
this.loadingTile=function(){
this.isLoading=true;
var _46=MQA.RESOURCES+"loading.gif";
if(!this.tileImageImg){
this._createImageObject(_46);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_46;
}
};
};
MQA.SatImageTile=function(_47,_48,top,_4a,_4b,_4c,_4d,_4e,_4f,_50){
MQA.ImageTile.call(this,_47,_48,top,_4a,_4b,_4c,_4d,_4e,_4f,_50);
this.url=MQA.PROTOCOL+"//%1/sat/Scale%2/%3/%4/%5/%6.jpg";
this.show=function(){
this.tileImageImg.image.style.visibility="visible";
this.tileImageImg.image.style.display="block";
};
this.hide=function(){
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.style.display="none";
};
this.getUrl=function(){
var X=this.gridColumn;
var Y=this.gridRow;
var _53=parseInt(this.gridColumn/1000);
var _54=parseInt(this.gridRow/1000);
while(X<0){
X+=MQA.MODS[this.zoom];
}
while(X>=MQA.MODS[this.zoom]){
X-=MQA.MODS[this.zoom];
}
_53=parseInt(X/1000);
_54=parseInt(Y/1000);
return this.url.replace(/%1/,MAPSERVER[X%MAPSERVER.length]).replace(/%2/,this.scale).replace(/%3/,_54).replace(/%4/,(Y-_54*1000)).replace(/%5/,_53).replace(/%6/,(X-_53*1000));
};
this.loadingTile=function(){
this.isLoading=true;
var _55=MQA.RESOURCES+"loading.gif";
if(!this.tileImageImg){
this._createImageObject(_55);
}else{
this.tileImageImg.image.style.visibility="hidden";
this.tileImageImg.image.src=_55;
}
};
};
MQA.BaseTileLayer=function(map,_57,_58,_59,_5a,_5b,_5c,_5d,_5e,_5f){
MQA.Base.call(this);
this.map=map;
this.tiles=null;
this.tileLayerDiv=null;
this.customLayer=false;
this.tileLayerId=(typeof (_57)=="undefined")?"bogusID":_57;
this.bounds=(_5a!=null)?MQA.Util._cloneValue(_5a):new MQA.RectLL(new MQA.PointLL(90,-180),new MQA.PointLL(-90,180));
this.minZoom=(_5b==null)?1:_5b;
this.maxZoom=(_5c==null)?16:_5c;
this.opacity=(_5d==null)?"1.0":_5d;
this.zindex=(_5e==null)?"0":_5e;
this.tileClass=_58;
this.copyrights=null;
if(_5f!=null){
var _60=new MQA.CopyrightCollection;
_60.add(_5f);
this.copyrights=_60;
}
this.copyrightLayerDivs=null;
this.options=_59;
this.visible=false;
this.userHidden=false;
this.urlTemplate="";
this.isLayerDrawn=false;
this.viewableTiles=0;
this.viewableTilesCount=0;
this.isViewableTilesDrawn=false;
this.isAdded=false;
this._facio=function(key,_62){
switch(key){
case "copyright":
this._setCopyright(_62);
break;
case "bounds":
this._setBounds();
break;
case "minZoom":
this._setMinZoom();
break;
case "maxZoom":
this._setMaxZoom();
break;
case "opacity":
this._setOpacity(_62);
break;
case "zindex":
this._setZindex();
break;
case "tileClass":
this._setTileClass();
break;
case "visible":
this._setVisible(_62);
break;
case "urlTemplate":
this._setUrlTemplate(_62);
break;
}
};
this._duco=function(key){
switch(key){
case "urlTemplate":
return this._getUrlTemplate(key);
break;
}
};
this._setCopyright=function(_64){
var _65=new MQA.CopyrightCollection;
_65.add(_64);
this.copyrights=_65;
};
this._getUrlTemplate=function(_66){
if(this.urlTemplate!=""){
return this.urlTemplate;
}else{
if(this.tiles){
return this.tiles[0][0].url;
}else{
return "";
}
}
};
this._setUrlTemplate=function(_67){
if(this.tiles!=null){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b].url=_67;
this.tiles[a][b].draw();
}
}
}
};
this._setVisible=function(_6a){
if(_6a){
if((this.map.zoom<=this.maxZoom)&&(this.map.zoom>=this.minZoom)){
this.show();
}
this.userHidden=false;
}else{
this.hide();
this.userHidden=true;
}
};
this._setZindex=function(){
if(this.tileLayerDiv){
this.tileLayerDiv.style.zIndex=this.zindex;
}
};
this._setTileClass=function(){
this.remove();
this.draw();
};
this._setOpacity=function(_6b){
if(this.tiles!=null){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b].opacity=_6b;
this.tiles[a][b].draw();
}
}
this.draw();
}
};
this._setBounds=function(){
this.draw();
};
this._setMinZoom=function(){
this.draw();
};
this._setMaxZoom=function(){
this.draw();
};
this._createTiles=function(){
if(this.tileLayerDiv==null){
this.tileLayerDiv=MQA.Util.createParentDiv(this.tileLayerId,0,0,"absolute",0,0,this.zindex,null,null);
}
this.map.div.appendChild(this.tileLayerDiv);
if(this.copyrights){
var y=this.copyrights.getSize();
this.copyrightLayerDivs=new Array();
for(var x=0;x<y;x++){
var _70=this.copyrights.getAt(x);
this.copyrightLayerDivs[x]=_70.draw();
this.map.parent.appendChild(this.copyrightLayerDivs[x]);
}
}
this.tiles=new Array(this.map.mapcols);
for(var a=0;a<this.map.mapcols;a++){
this.tiles[a]=new Array(this.map.maprows);
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b]=new this.tileClass(this,(a-2)*this.map.tilesize+this.map.m_layoffX-this.map.m_dragoffX+this.map.m_tileoffX,(b-2)*this.map.tilesize+this.map.m_layoffY-this.map.m_dragoffY+this.map.m_tileoffY,this.map.m_centerX-2+a,this.map.m_centerY+2-b,this.map.scale,this.map.zoom,this.map.tilesize,this.opacity,this.options);
this.tiles[a][b].draw();
}
}
};
this.getId=function(){
return this.tileLayerId;
};
this.remove=function(){
this.urlTemplate="";
this.removeAllTiles();
if(this.copyrights){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).remove();
}
}
if(this.tileLayerDiv){
MQA.Util._purge(this.tileLayerDiv);
MQA.Util._nukeChildren(this.tileLayerDiv);
this.tileLayerDiv.parentNode.removeChild(this.tileLayerDiv);
this.isLayerDrawn=false;
this.isViewableTilesDrawn=false;
}
};
this.dispose=function(){
this.removeAllTiles();
this.map=null;
this.bounds=null;
this.tileClass=null;
if(this.tileLayerDiv){
this.tileLayerDiv.innerHTML=null;
this.tileLayerDiv.outerHTML="";
MQA.Util._deleteDOMObject(this.tileLayerDiv);
this.tileLayerDiv=null;
}
if(this.copyrights){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).dispose();
this.copyrights.remove(x);
this.copyrightLayerDivs[x].innerHTML=null;
this.copyrightLayerDivs[x].outerHTML="";
this.copyrightLayerDivs[x]=null;
}
this.copyrightLayerDivs=null;
this.copyrights=null;
}
};
this.removeCopyright=function(_77){
if(this.copyrights){
_77.dispose();
}
};
this.removeAllCopyrights=function(){
if(this.copyrights){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.removeCopyright(this.copyrights.getAt(x));
}
this.copyrightLayerDivs=null;
this.copyrights=null;
}
};
this.removeCopyrights=function(_7a){
if(_7a){
var y=_7a.getSize();
for(var x=0;x<y;x++){
this.removeCopyright(_7a.getAt(x));
}
}
};
this.replaceCopyrights=function(_7d){
this.removeCopyrights(_7d);
this.addCopyrights(_7d);
};
this.addCopyright=function(_7e){
var _7f=0;
if(!this.copyrightLayerDivs){
this.copyrightLayerDivs=new Array();
}else{
_7f=this.copyrightLayerDivs.length+1;
}
if(!this.copyrights){
this.copyrights=new MQA.CopyrightCollection;
}
this.copyrights.add(_7e);
this.copyrightLayerDivs[_7f]=_7e.draw();
this.map.parent.appendChild(this.copyrightLayerDivs[_7f]);
};
this.addCopyrights=function(_80){
var y=_80.getSize();
for(var x=0;x<y;x++){
this.addCopyright(_80.getAt(x));
}
};
this.removeAllTiles=function(){
if(this.tiles!=null){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tiles[a][b].dispose();
this.tiles[a][b]=null;
}
}
this.tiles=null;
}
};
this.draw=function(){
};
this.rebuildTiles=function(){
this.isViewableTilesDrawn=false;
this.isLayerDrawn=false;
var _85,_86,top;
if(((this.map.zoom<=this.maxZoom)&&(this.map.zoom>=this.minZoom))&&!this.userHidden){
this.show();
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
var _86=(a-2)*this.map.tilesize+this.map.m_layoffX;
var top=(b-2)*this.map.tilesize+this.map.m_layoffY;
var _8a=this.map.m_centerX-2+a;
var _8b=this.map.m_centerY+2-b;
this.rebuildTile(this.tiles[a][b],_86,top,_8a,_8b);
}
}
}else{
this.hide();
}
};
this.rebuildTile=function(_8c,_8d,top,_8f,_90){
_8f=(typeof (_8f)=="undefined")?_8c.gridColumn:_8f;
_90=(typeof (_90)=="undefined")?_8c.gridRow:_90;
_8c.updateTile(_8d,top,_8f,_90,this.map.scale,this.map.zoom);
this.tileDisplay(_8c);
};
this.itterateTileDisplay=function(){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tileDisplay(this.tiles[a][b]);
}
}
};
this.tileDisplay=function(_93){
var _94=new MQA.PointXY((_93.x+this.map.m_dragoffX),(_93.y+this.map.m_dragoffY));
var _95=new MQA.PointXY((_93.x+this.map.m_dragoffX)+256,(_93.y+this.map.m_dragoffY)+256);
var _96=new MQA.RectXY(_94,_95);
var _97=new MQA.RectXY(new MQA.PointXY(0,0),new MQA.PointXY(this.map.div1.style.width,this.map.div1.style.height));
if(MQA.Util.isIntersectedXY(_96,_97)){
this.viewableTiles++;
}
var _98=this.map.getLLToXY(this.bounds.ul);
var _99=this.map.getLLToXY(this.bounds.lr);
var _9a=new MQA.RectXY(_98,_99);
if(MQA.Util.isIntersectedXY(_96,_9a)){
if(!this.isLayerDrawn){
_93.setVisible(true);
}else{
_93.show();
}
}else{
if(!this.isLayerDrawn){
_93.setVisible(false);
}else{
_93.hide();
}
}
};
this.loadingTile=function(_9b){
_9b.loadingTile();
};
this.setAllLoadingTiles=function(){
if(this.visible){
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.loadingTile(this.tiles[a][b]);
}
}
}
};
this.show=function(){
this.tileLayerDiv.style.visibility="visible";
this.tileLayerDiv.style.display="block";
this.visible=true;
if(this.copyrights!=null){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).show();
}
}
};
this.hide=function(){
this.tileLayerDiv.style.visibility="hidden";
this.tileLayerDiv.style.display="none";
this.visible=false;
if(this.copyrights!=null){
var y=this.copyrights.getSize();
for(var x=0;x<y;x++){
this.copyrights.getAt(x).hide();
}
}
};
this.getTileCenterLatLng=function(_a2,top,_a4){
var _a5=this.map.getDragOffset();
_a2+=_a5.x+(_a4/2);
top+=_a5.y+(_a4/2);
var _a6=this.map.getXYToLL(new MQA.PointXY(_a2,top));
return (_a6);
};
this.scrollLayer=function(){
var _a7=this.map.m_tileoffX;
var _a8=this.map.m_tileofX;
var _a9=this.map.m_tileoffY;
var _aa=this.map.m_tileofY;
while(_a7+_a8>MQA.TILESIZE){
this.tiles.unshift(this.tiles.pop());
for(var b=0;b<this.map.maprows;b++){
this.tiles[0][b].loadingTile();
}
for(var b=0;b<this.map.maprows;b++){
var _ac=this.tiles[0][b];
var _ad=this.tiles[1][b];
_ac.updateTile(_ad.x-this.map.tilesize,_ac.y,_ad.gridColumn-1,_ac.gridRow,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_ac);
}
}
_a7-=this.map.tilesize;
}
while(_a7+_a8<0){
this.tiles.push(this.tiles.shift());
for(var b=0;b<this.map.maprows;b++){
this.loadingTile(this.tiles[this.map.mapcols-1][b]);
}
for(var b=0;b<this.map.maprows;b++){
var _ac=this.tiles[this.map.mapcols-1][b];
var _ad=this.tiles[this.map.mapcols-2][b];
_ac.updateTile(_ad.x+this.map.tilesize,_ac.y,_ad.gridColumn+1,_ac.gridRow,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_ac);
}
}
_a7+=this.map.tilesize;
}
while(_a9+_aa>MQA.TILESIZE){
for(var a=0;a<this.map.mapcols;a++){
this.tiles[a].unshift(this.tiles[a].pop());
this.loadingTile(this.tiles[a][0]);
}
for(var a=0;a<this.map.mapcols;a++){
var _ac=this.tiles[a][0];
var _ad=this.tiles[a][1];
_ac.updateTile(_ac.x,_ad.y-this.map.tilesize,_ac.gridColumn,_ad.gridRow+1,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_ac);
}
}
_a9-=this.map.tilesize;
}
while(_a9+_aa<0){
for(var a=0;a<this.map.mapcols;a++){
this.tiles[a].push(this.tiles[a].shift());
this.loadingTile(this.tiles[a][this.map.maprows-1]);
}
for(var a=0;a<this.map.mapcols;a++){
var _ac=this.tiles[a][this.map.maprows-1];
var _ad=this.tiles[a][this.map.maprows-2];
_ac.updateTile(_ac.x,_ad.y+this.map.tilesize,_ac.gridColumn,_ad.gridRow-1,this.map.scale,this.map.zoom);
if(this.customLayer){
this.tileDisplay(_ac);
}
}
_a9+=this.map.tilesize;
}
};
this.onTileDrawn=function(_af){
var mqe=new MQA.Event("MQA.TileLayer.tileDrawn");
mqe.srcObject=_af;
MQA.EventManager.trigger(this,"tiledrawn",mqe);
this.onViewableTilesDrawn(_af);
this.onLayerDrawn(mqe);
};
this.onViewableTilesDrawn=function(_b1){
if(this.isViewableTilesDrawn){
return;
}
var _b2,_b3,_b4;
var _b5=new MQA.RectXY(new MQA.PointXY(0,0),new MQA.PointXY(this.map.div1.style.width,this.map.div1.style.height));
_b2=new MQA.PointXY((_b1.x+this.map.m_dragoffX),(_b1.y+this.map.m_dragoffY));
_b3=new MQA.PointXY((_b1.x+this.map.m_dragoffX)+256,(_b1.y+this.map.m_dragoffY)+256);
_b4=new MQA.RectXY(_b2,_b3);
if(MQA.Util.isIntersectedXY(_b4,_b5)){
this.viewableTilesCount++;
}
if(this.viewableTilesCount>=this.viewableTiles){
this.isViewableTilesDrawn=true;
this.viewableTilesCount=0;
var e=new MQA.Event("MQA.TileLayer.viewableTilesDrawn");
e.srcObject=_b1;
MQA.EventManager.trigger(this,"viewabletilesdrawn",e);
}
};
this.onLayerDrawn=function(mqe){
if(this.isLayerDrawn){
return;
}
var _b8=true;
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
if(!this.tiles[a]||!this.tiles[a][b]||this.tiles[a][b].isDrawn==false){
_b8=false;
break;
}
}
}
if(_b8){
this.isLayerDrawn=true;
var e=new MQA.Event("MQA.TileLayer.layerDrawn");
e.srcObject=this;
MQA.EventManager.trigger(this,"layerdrawn",e);
this.map.onLayerDrawn(e);
}
};
};
MQA.MapTileLayer=function(map,_bd,_be,_bf,_c0,_c1,_c2,_c3,_c4,_c5){
MQA.BaseTileLayer.call(this,map,_bd,_be,_bf,_c0,_c1,_c2,_c3,_c4,_c5);
this.draw=function(){
if(this.tiles==null){
this._createTiles();
}
this.show();
};
};
MQA.SatTileLayer=function(map,_c7,_c8,_c9,_ca,_cb,_cc,_cd,_ce,_cf){
MQA.BaseTileLayer.call(this,map,_c7,_c8,_c9,_ca,_cb,_cc,_cd,_ce,_cf);
this.draw=function(){
if(this.tiles==null){
this._createTiles();
}
this.show();
};
};
MQA.StrlblTileLayer=function(map,_d1,_d2,_d3,_d4,_d5,_d6,_d7,_d8,_d9){
MQA.BaseTileLayer.call(this,map,_d1,_d2,_d3,_d4,_d5,_d6,_d7,_d8,_d9);
this.draw=function(){
if(this.tiles==null){
this._createTiles();
}
this.show();
};
};
MQA.TileLayer=function(map,_db,_dc,_dd,_de,_df,_e0,_e1,_e2,_e3){
MQA.BaseTileLayer.call(this,map,_db,_dc,_dd,_de,_df,_e0,_e1,_e2,_e3);
this.customLayer=true;
this.draw=function(){
if(this.isAdded){
if(this.tiles==null){
this._createTiles();
}
if(((this.map.zoom<=this.maxZoom)&&(this.map.zoom>=this.minZoom))&&!this.userHidden){
this.show();
for(var a=0;a<this.map.mapcols;a++){
for(var b=0;b<this.map.maprows;b++){
this.tileDisplay(this.tiles[a][b]);
}
}
}else{
this.hide();
}
}
};
};
MQA.TileLayerCollection=function(){
MQA.TKObjectCollection.call(this);
};
MQA.TileLayerCollection.prototype=new MQA.TKObjectCollection();
MQA.TileLayerCollection.prototype.constructor=MQA.TileLayerCollection;

MQA.PLACEBASECONSTANT={INCHESPERUNIT:39.3701,DPI:72,STDPARALLEL:37.5,OFFSET:new Array({x:0,y:0},{x:0,y:0},{x:0,y:0},{x:-35,y:13},{x:0,y:-123},{x:0,y:-65},{x:0,y:53},{x:0,y:-110},{x:2,y:-13},{x:-2,y:45},{x:119,y:-108},{x:-17,y:38},{x:-33,y:75},{x:69,y:-119},{x:-65,y:-94},{x:63,y:-70},{x:-30,y:-105}),TILESIZE:256};
MQA.PlaceBaseTile=function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){
MQA.ImageTile.call(this,_1,_2,_3,_4,_5,_6,_7,_8,_9,_a);
this.options=_a;
this.url="http://dl1.pushpin.com/tilecache/prod:ts_%1:dpi_%2:off_%3,%4/%5/merged/%6/meta_t%7/t%8l%9/t%10l%11.png?key=%12";
this.getUrl=function(){
var _b=this.scale;
var _c=this.parent.getTileCenterLatLng(this.x,this.y,this.size);
var _d=new Proj();
var _e=new Object();
_e.x=_c.lng;
_e.y=_c.lat;
var _f=_d.projectEquirectangular(_e,MQA.PLACEBASECONSTANT.STDPARALLEL);
var _10=(_f.x*MQA.PLACEBASECONSTANT.INCHESPERUNIT/_b*MQA.PLACEBASECONSTANT.DPI);
var _11=-(_f.y*MQA.PLACEBASECONSTANT.INCHESPERUNIT/_b*MQA.PLACEBASECONSTANT.DPI);
var _12=Math.floor(_11/1280)*1280;
var _13=Math.floor(_10/1280)*1280;
var top=Math.floor(_11/256)*256;
var _15=Math.floor(_10/256)*256;
var _16=this.url.replace(/%1/,MQA.PLACEBASECONSTANT.TILESIZE).replace(/%2/,MQA.PLACEBASECONSTANT.DPI).replace(/%3/,MQA.PLACEBASECONSTANT.OFFSET[this.zoom].x).replace(/%4/,MQA.PLACEBASECONSTANT.OFFSET[this.zoom].y).replace(/%5/,_b).replace(/%6/,this.options.layerSpec).replace(/%7/,_12).replace(/%8/,_12).replace(/%9/,_13).replace(/%10/,top).replace(/%11/,_15).replace(/%12/,this.options.key);
return (_16);
},this.isPng=function(){
return true;
};
};
MQA.PlaceBaseTile.prototype=new MQA.ImageTile();
MQA.PlaceBaseTile.prototype.constructor=MQA.PlaceBaseTile;
Proj=function(){
};
Proj.prototype.earthRadius=6378137;
Proj.prototype.eccentricity=0.08181919131087181;
Proj.prototype.meters2rad=function(m){
return m/this.earthRadius;
};
Proj.prototype.rad2meters=function(r){
return this.earthRadius*r;
};
Proj.prototype.deg2rad=function(d){
return d*Math.PI/180;
};
Proj.prototype.rad2deg=function(r){
return r*180/Math.PI;
};
alertp=function(_1b){
alert(_1b.x+" "+_1b.y);
};
Proj.prototype.projectMiller=function(_1c){
var ret=new Object();
ret.x=this.deg2rad(_1c.x);
ret.y=this.deg2rad(_1c.y);
ret=this.projectMillerRad(ret);
ret.x=this.rad2meters(ret.x);
ret.y=this.rad2meters(ret.y);
return ret;
};
Proj.prototype.projectMerc=function(_1e){
var ret=new Object();
ret.x=this.deg2rad(_1e.x);
ret.y=this.deg2rad(_1e.y);
ret=this.projectMercRad(ret);
ret.x=this.rad2meters(ret.x);
ret.y=this.rad2meters(ret.y);
return ret;
};
Proj.prototype.projectEquirectangular=function(_20,_21){
var rc;
var ret=new Object();
if(_21==null||_21==37.5){
rc=0.793353340291235;
}else{
rc=Math.cos(this.deg2rad(_21));
}
ret.y=this.deg2rad(_20.y)*this.earthRadius;
ret.x=this.deg2rad(_20.x)*rc*this.earthRadius;
return ret;
};
Proj.prototype.unprojectEquirectangular=function(_24,_25){
var rc;
var ret=new Object();
if(_25==null||_25==37.5){
rc=0.793353340291235;
}else{
rc=Math.cos(this.deg2rad(_25));
}
ret.y=this.rad2deg(_24.y/this.earthRadius);
ret.x=this.rad2deg(_24.x/this.earthRadius/rc);
return ret;
};
Proj.prototype.projectDefault=function(_28){
var ret=new Object();
ret.x=this.rad2meters(this.deg2rad(_28.x));
ret.y=this.rad2meters(this.deg2rad(_28.y));
return ret;
};
Proj.prototype.unprojectDefault=function(_2a){
var ret=new Object();
ret.x=this.rad2deg(this.meters2rad(_2a.x));
ret.y=this.rad2deg(this.meters2rad(_2a.y));
return ret;
};
Proj.prototype.unprojectMiller=function(_2c){
var ret=new Object();
ret.x=this.meters2rad(_2c.x);
ret.y=this.meters2rad(_2c.y);
ret=this.unprojectMillerRad(ret);
ret.x=this.rad2deg(ret.x);
ret.y=this.rad2deg(ret.y);
return ret;
};
Proj.prototype.unprojectMerc=function(_2e){
var ret=new Object();
ret.x=this.meters2rad(_2e.x);
ret.y=this.meters2rad(_2e.y);
ret=this.unprojectMercRad(ret);
ret.x=this.rad2deg(ret.x);
ret.y=this.rad2deg(ret.y);
return ret;
};
Proj.prototype.projectMillerRad=function(_30){
var ret=new Object();
ret.x=_30.x;
ret.y=Math.log(Math.tan(Math.PI*0.25+_30.y*0.4))*1.25;
return ret;
};
Proj.prototype.projectMercRad=function(_32){
var ret=new Object();
var _34=Math.pow(((1-this.eccentricity*Math.sin(_32.y))/(1+this.eccentricity*Math.sin(_32.y))),this.eccentricity*0.5);
ret.x=_32.x;
ret.y=Math.log(Math.tan(Math.PI*0.25+_32.y*0.5)*_34);
return ret;
};
Proj.prototype.unprojectMillerRad=function(_35){
var ret=new Object();
ret.x=_35.x;
ret.y=2.5*(Math.atan(Math.exp(0.8*_35.y))-Math.PI*0.25);
return ret;
};
Proj.prototype.unprojectMercRad=function(_37){
var ret=new Object();
var es=this.eccentricity*this.eccentricity;
var es2=es*es;
var es3=es2*es;
var es4=es3*es;
var _3d=es*0.5+5*es2/24+es3/12+13*es4/360;
var _3e=7*es2/48+29*es3/240+811*es4/11520;
var _3f=7*es3/120+81*es4/1120;
var _40=4279*es4/161280;
var _41=Math.PI*0.5-2*Math.atan(1/Math.exp(_37.y));
ret.y=_41+_3d*Math.sin(2*_41)+_3e*Math.sin(4*_41)+_3f*Math.sin(6*_41)+_40*Math.sin(8*_41);
ret.x=_37.x;
return ret;
};

if(typeof (MQCompatibilityMode)!="undefined"){
if(MQCompatibilityMode=="5.2.0"){
MQControl=MQA.Control;
MQLargeZoomControl=MQA.LargeZoomControl;
MQPanControl=MQA.PanControl;
MQZoomControl=MQA.ZoomControl;
MQViewControl=MQA.ViewControl;
MQEvent=MQA.Event;
MQEventManager=MQA.EventManager;
MQEventCallback=MQA._prEvent.EventCallback;
MQInfoWindow=MQA.InfoWindow;
PointFloatXY=MQA.PointFloatXY;
PointXY=MQA.PointXY;
PointLL=MQA.PointLL;
RectLL=MQA.RectLL;
RectXY=MQA.RectXY;
Tile=MQA.Tile;
MQTKObjectCollection=MQA.TKObjectCollection;
MQMapLogo=MQA.MapLogo;
MQMapCorner=MQA.MapCorner;
MQMapCornerPlacement=MQA.MapCornerPlacement;
MQRectLL=MQA.RectLL;
MQRectXY=MQA.RectXY;
MQSize=MQA.Size;
MQClip=MQA.Clip;
MQMapInit=MQA.MapInit;
MQInitOverlays=MQA.InitOverlays;
MQShapeOverlay=MQA.ShapeOverlay;
MQRectangleOverlay=MQA.RectangleOverlay;
MQLineOverlay=MQA.LineOverlay;
MQPolygonOverlay=MQA.PolygonOverlay;
MQEllipseOverlay=MQA.EllipseOverlay;
MQImageOverlay=MQA.ImageOverlay;
MQOverlayCollection=MQA.OverlayCollection;
MQPoiCollection=MQA.PoiCollection;
MQMapIcon=MQA.MapIcon;
MQPoi=MQA.Poi;
MQLeaderLineDotImage=MQA.LeaderLineDotImage;
MQLeaderLineDotIcon=MQA.LeaderLineDotIcon;
MQDeclutter=MQA.Declutter;
MQDeclutterPoi=MQA.DeclutterPoi;
MQPageMarkIcon=MQA.PageMarkIcon;
MQPrevNextIcon=MQA.PrevNextIcon;
MQDeclutterIcon=MQA.DeclutterIcon;
MQRolloverWindow=MQA.RolloverWindow;
SlideBroker=MQA.SlideBroker;
MQTileMap=MQA.TileMap;
pause=MQA.Util.pause;
asPix=MQA.Util.asPix;
createImage=MQA.Util.createImage;
calcPercentage=MQA.Util.calcPercentage;
stripHTMLTags=MQA.Util.stripHTMLTags;
panAngle=MQA.Util.panAngle;
isOverLimit=MQA.Util.isOverLimit;
MQInitDojo=MQA.Util.InitDojo;
getWindowScrollXY=MQA.Util.getWindowScrollXY;
getHTMLSubstring=MQA.Util.getHTMLSubstring;
getBrowserSize=MQA.Util.getBrowserSize;
isSupportedBrowser=MQA.Util.isSupportedBrowser;
getBrowserInfo=MQA.Util.getBrowserInfo;
mqBrowserInfo=MQA.Util.getBrowserInfo;
PIXERSPERLATDEGREE=MQA.PIXERSPERLATDEGREE;
PIXERSPERLNGDEGREE=MQA.PIXERSPERLNGDEGREE;
TILESIZE=MQA.TILESIZE;
SLIDESTEPS=MQA.SLIDESTEPS;
SLIDEDELAY=MQA.SLIDEDELAY;
SCALES=MQA.SCALES;
MODS=MQA.MODS;
VENDORLIST=MQA.VENDORLIST;
MAPVENDORS=MQA.MAPVENDORS;
RESOURCES=MQA.RESOURCES;
STATICRESOURCES=MQA.STATICRESOURCES;
CORNER_TOPLEFT=MQA.CORNER_TOPLEFT;
CORNER_TOPRIGHT=MQA.CORNER_TOPRIGHT;
CORNER_BOTTOMLEFT=MQA.CORNER_BOTTOMLEFT;
CORNER_BOTTOMRIGHT=MQA.CORNER_BOTTOMRIGHT;
LOGO_MQ_LOGO=MQA.LOGO_MQ_LOGO;
LOGO_MQ_SCALES=MQA.LOGO_MQ_SCALES;
LOGO_MQ_COPY=MQA.LOGO_MQ_COPY;
LOGO_NT_COPY=MQA.LOGO_NT_COPY;
LOGO_I3_COPY=MQA.LOGO_I3_COPY;
LOGO_MAP_COPY=MQA.LOGO_MAP_COPY;
LOGO_SAT_COPY=MQA.LOGO_SAT_COPY;
EVENT_NONE=MQA.EVENT_NONE;
EVENT_CLICK=MQA.EVENT_CLICK;
EVENT_DBLCLICK=MQA.EVENT_DBLCLICK;
OPER_RECENTER=MQA.OPER_RECENTER;
OPER_RECENTERZOOM=MQA.OPER_RECENTERZOOM;
MAXMAPHEIGHT=MQA.MAXMAPHEIGHT;
MAXMAPWIDTH=MQA.MAXMAPWIDTH;
BUTTON_MQ_LEFT=MQA.BUTTON_MQ_LEFT;
BUTTON_MQ_MIDDLE=MQA.BUTTON_MQ_MIDDLE;
BUTTON_MQ_RIGHT=MQA.BUTTON_MQ_RIGHT;
MASTER_BROKER=MQA.MASTER_BROKER;
SAFARI_BROWSER=MQA.SAFARI_BROWSER;
PAN_NORTH=MQA.PAN_NORTH;
PAN_SOUTH=MQA.PAN_SOUTH;
PAN_EAST=MQA.PAN_EAST;
PAN_WEST=MQA.PAN_WEST;
CONTROL_PANZOOM=MQA.CONTROL_PANZOOM;
CONTROL_PAN=MQA.CONTROL_PAN;
CONTROL_ZOOM=MQA.CONTROL_ZOOM;
CONTROL_TYPE=MQA.CONTROL_TYPE;
SURFACE_OFFSET=MQA.SURFACE_OFFSET;
NOTHING=MQA.NOTHING;
MQA.TileLayer.prototype.setMinZoom=function(_1){
this.setValue("minZoom",_1);
};
MQA.TileLayer.prototype.setMaxZoom=function(_2){
this.setValue("maxZoom",_2);
};
MQA.TileLayer.prototype.setBounds=function(_3){
this.setValue("bounds",_3);
};
MQA.TileLayer.prototype.setOpacity=function(_4){
this.setValue("opacity",_4);
};
MQA.TileLayer.prototype.setZindex=function(_5){
this.setValue("zindex",_5);
};
MQA.TileLayer.prototype.setTileClass=function(_6){
this.setValue("tileClass",_6);
};
MQA.TileLayer.prototype.getMinZoom=function(){
return this.getValue("minZoom");
};
MQA.TileLayer.prototype.getMaxZoom=function(){
return this.getValue("maxZoom");
};
MQA.TileLayer.prototype.getBounds=function(){
return this.getValue("bounds");
};
MQA.TileLayer.prototype.getOpacity=function(){
return this.getValue("opacity");
};
MQA.TileLayer.prototype.getZindex=function(){
return this.getValue("zindex");
};
MQA.TileLayer.prototype.getTileClass=function(){
return this.getValue("tileClass");
};
}
}

MQA.Graphics=new function(){
this.vmlNamespace=null;
this.vmlStyleRule=false;
this.setDrawMethod=function(){
var _1=MQA.browser.name;
var _2=MQA.browser.version;
if(_1=="msie"){
this.drawMethod="vml";
this.eventsActive=true;
}else{
if(_1=="safari"){
this.drawMethod="canvas";
this.eventsActive=false;
}else{
this.drawMethod="svg";
this.eventsActive=true;
}
}
};
this.toHex=function(n){
var _4=n.toString(16).toUpperCase();
return (_4.length==1?"0"+_4:_4);
};
this.normalizeColor=function(c){
var p=new Object();
if(typeof (c)=="object"){
p.rgb=c;
p.hex="#"+this.toHex(c[0])+this.toHex(c[1])+this.toHex(c[2]);
}else{
if(c.substring(0,1)=="#"){
p.rgb=new Array();
p.rgb[0]=parseInt("0x"+c.substring(1,3));
p.rgb[1]=parseInt("0x"+c.substring(3,5));
p.rgb[2]=parseInt("0x"+c.substring(5,7));
p.hex=c;
}else{
throw new Error("Invalid color value. Use hex or 3-value RGB array");
}
}
return p;
};
this.createSurface=function(_7,_8,_9){
var _a;
switch(this.drawMethod){
case "svg":
_a=document.createElementNS("http://www.w3.org/2000/svg","svg");
_a.setAttribute("height",_9);
_a.setAttribute("width",_8);
_a.setAttribute("xmlns","http://www.w3.org/2000/svg");
_a.setAttribute("version","1.1");
_a.setAttribute("viewBox","0 0 "+_8+" "+_9);
var _b=document.createElement("defs");
_a.appendChild(_b);
break;
case "vml":
this.vmlNamespace=document.namespaces.add("v","urn:schemas-microsoft-com:vml");
var _c=document.styleSheets[0];
if(!this.vmlStyleRule){
_c.addRule("v\\:*","behavior: url(#default#VML);display: inline-block;");
this.vmlStyleRule=true;
}
_a=document.createElement("v:group");
_a.setAttribute("coordsize",_8+" "+_9);
_a.setAttribute("coordorigin","0 0");
_a.style.position="absolute";
_a.style.width=_8+"px";
_a.style.height=_9+"px";
_a.style.visibility="visible";
break;
case "canvas":
_a=document.createElement("div");
_a.style.left="0px";
_a.style.top="0px";
_a.style.position="relative";
_a.style.width=_8+"px";
_a.style.height=_9+"px";
_a.style.visibility="visible";
break;
}
this.surfaceWidth=_8;
this.surfaceHeight=_9;
_7.appendChild(_a);
return _a;
};
this.remove=function(_d,_e){
switch(this.drawMethod){
case "svg":
case "canvas":
break;
case "vml":
MQA.Util._nukeChildren(_e);
break;
}
_e.parentNode.removeChild(_e);
return null;
};
this.drawPolygon=function(_f,_10,_11,_12,_13,_14,_15){
var _16;
var bc=this.normalizeColor(_10);
var fc=this.normalizeColor(_13);
var s="M "+_f[0].x+" "+_f[0].y;
if(this.drawMethod=="svg"){
for(var i=1;i<_f.length;i++){
s+=" L "+_f[i].x+" "+_f[i].y;
}
s+=" z";
}else{
s+=" l ";
for(var i=1;i<_f.length;i++){
s+=_f[i].x+","+_f[i].y+" ";
}
s+=" x e";
}
switch(this.drawMethod){
case "svg":
var _16=document.createElementNS("http://www.w3.org/2000/svg","path");
_16.setAttribute("d",s);
_16.setAttribute("stroke",bc.hex);
_16.setAttribute("stroke-width",_12);
_16.setAttribute("stroke-opacity",_11);
_16.setAttribute("fill",fc.hex);
_16.setAttribute("fill-opacity",_14);
break;
case "vml":
var _16=document.createElement("v:shape");
_16.style.width=this.surfaceWidth+"px";
_16.style.height=this.surfaceHeight+"px";
_16.style.position="absolute";
_16.setAttribute("stroked","true");
_16.setAttribute("coordsize",this.surfaceWidth+" "+this.surfaceHeight);
_16.setAttribute("coordorigin","0 0");
var _1b=document.createElement("v:fill");
_1b.setAttribute("opacity",_14);
_1b.setAttribute("color",fc.hex);
_16.appendChild(_1b);
var _1c=document.createElement("v:stroke");
_1c.setAttribute("miterlimit","8.0");
_1c.setAttribute("joinstyle","miter");
_1c.setAttribute("endcap","flat");
_1c.setAttribute("opacity",_11);
_1c.setAttribute("color",bc.hex);
_1c.setAttribute("weight",_12);
_16.appendChild(_1c);
var _1d=document.createElement("v:path");
_1d.setAttribute("v",s);
_16.appendChild(_1d);
break;
case "canvas":
var _16=document.createElement("canvas");
_16.setAttribute("width",this.surfaceWidth);
_16.setAttribute("height",this.surfaceHeight);
_16.style.position="absolute";
_16.style.left="0px";
_16.style.top="0px";
var ctx=_16.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_14+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_11+")";
ctx.lineWidth=_12;
ctx.beginPath();
ctx.moveTo(_f[0].x,_f[0].y);
for(var i=1;i<_f.length;i++){
ctx.lineTo(_f[i].x,_f[i].y);
}
ctx.closePath();
ctx.fill();
ctx.stroke();
break;
}
_16.style.display=(_15?"inline":"none");
return _16;
};
this.drawRectangle=function(_1f,_20,_21,_22,_23,_24,_25){
var _26;
var bc=this.normalizeColor(_20);
var fc=this.normalizeColor(_23);
switch(this.drawMethod){
case "svg":
_26=document.createElementNS("http://www.w3.org/2000/svg","rect");
_26.setAttribute("x",_1f[0].x);
_26.setAttribute("y",_1f[0].y);
_26.setAttribute("width",_1f[1].x-_1f[0].x);
_26.setAttribute("height",_1f[1].y-_1f[0].y);
_26.setAttribute("stroke",bc.hex);
_26.setAttribute("stroke-width",_22);
_26.setAttribute("stroke-opacity",_21);
_26.setAttribute("fill",fc.hex);
_26.setAttribute("fill-opacity",_24);
break;
case "vml":
_26=document.createElement("v:rect");
_26.style.left=_1f[0].x+"px";
_26.style.top=_1f[0].y+"px";
_26.style.width=_1f[1].x-_1f[0].x+"px";
_26.style.height=_1f[1].y-_1f[0].y+"px";
_26.style.position="absolute";
_26.setAttribute("stroked","true");
var _29=document.createElement("v:fill");
_29.setAttribute("opacity",_24);
_29.setAttribute("color",fc.hex);
_26.appendChild(_29);
var _2a=document.createElement("v:stroke");
_2a.setAttribute("miterlimit","8.0");
_2a.setAttribute("joinstyle","miter");
_2a.setAttribute("endcap","flat");
_2a.setAttribute("opacity",_21);
_2a.setAttribute("color",bc.hex);
_2a.setAttribute("weight",_22);
_26.appendChild(_2a);
break;
case "canvas":
var _26=document.createElement("canvas");
_26.setAttribute("width",this.surfaceWidth);
_26.setAttribute("height",this.surfaceHeight);
_26.style.position="absolute";
_26.style.left="0px";
_26.style.top="0px";
var ctx=_26.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_24+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_21+")";
ctx.lineWidth=_22;
ctx.fillRect(_1f[0].x,_1f[0].y,_1f[1].x-_1f[0].x,_1f[1].y-_1f[0].y);
ctx.strokeRect(_1f[0].x,_1f[0].y,_1f[1].x-_1f[0].x,_1f[1].y-_1f[0].y);
break;
}
_26.style.display=(_25?"inline":"none");
return _26;
};
this.drawEllipse=function(_2c,_2d,_2e,_2f,_30,_31,_32){
var _33;
var bc=this.normalizeColor(_2d);
var fc=this.normalizeColor(_30);
var _36=_2c[1].x-_2c[0].x;
var _37=_2c[1].y-_2c[0].y;
var _38=parseInt(_36/2);
var _39=parseInt(_37/2);
var _3a=_2c[1].x-_38;
var _3b=_2c[1].y-_39;
switch(this.drawMethod){
case "svg":
_33=document.createElementNS("http://www.w3.org/2000/svg","ellipse");
_33.setAttribute("cx",_3a);
_33.setAttribute("cy",_3b);
_33.setAttribute("rx",_38);
_33.setAttribute("ry",_39);
_33.setAttribute("stroke",bc.hex);
_33.setAttribute("stroke-width",_2f);
_33.setAttribute("stroke-opacity",_2e);
_33.setAttribute("fill",fc.hex);
_33.setAttribute("fill-opacity",_31);
break;
case "vml":
_33=document.createElement("v:oval");
_33.style.left=_2c[0].x+"px";
_33.style.top=_2c[0].y+"px";
_33.style.width=_36+"px";
_33.style.height=_37+"px";
_33.style.position="absolute";
_33.setAttribute("stroked","true");
var _3c=document.createElement("v:fill");
_3c.setAttribute("opacity",_31);
_3c.setAttribute("color",fc.hex);
_33.appendChild(_3c);
var _3d=document.createElement("v:stroke");
_3d.setAttribute("miterlimit","8.0");
_3d.setAttribute("joinstyle","miter");
_3d.setAttribute("endcap","flat");
_3d.setAttribute("opacity",_2e);
_3d.setAttribute("color",bc.hex);
_3d.setAttribute("weight",_2f);
_33.appendChild(_3d);
break;
case "canvas":
var _33=document.createElement("canvas");
_33.setAttribute("width",this.surfaceWidth);
_33.setAttribute("height",this.surfaceHeight);
_33.style.position="absolute";
_33.style.left="0px";
_33.style.top="0px";
var ctx=_33.getContext("2d");
ctx.fillStyle="rgba("+fc.rgb[0]+","+fc.rgb[1]+","+fc.rgb[2]+","+_31+")";
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_2e+")";
ctx.lineWidth=_2f;
if((_2c[1].x-_2c[0].x)!=(_2c[1].y-_2c[0].y)){
var _3f=Math.round((_2c[1].y-_2c[0].y)/4);
var _40=Math.round((_2c[1].x-_2c[0].x)/4);
ctx.moveTo(_2c[0].x,_2c[0].y+(2*_3f));
ctx.bezierCurveTo(_2c[0].x,_2c[0].y+_3f,_2c[0].x+_40,_2c[0].y,_2c[0].x+(2*_40),_2c[0].y);
ctx.bezierCurveTo(_2c[0].x+(3*_40),_2c[0].y,_2c[1].x,_2c[0].y+_3f,_2c[1].x,_2c[0].y+(2*_3f));
ctx.bezierCurveTo(_2c[1].x,_2c[1].y-_3f,_2c[1].x-_40,_2c[1].y,_2c[0].x+(2*_40),_2c[1].y);
ctx.bezierCurveTo(_2c[0].x+_40,_2c[1].y,_2c[0].x,_2c[1].y-_3f,_2c[0].x,_2c[0].y+(2*_3f));
}else{
var _41=_2c[0].x+Math.round((_2c[1].x-_2c[0].x)/2);
var _42=_2c[0].y+Math.round((_2c[1].y-_2c[0].y)/2);
ctx.arc(_41,_42,Math.round((_2c[1].x-_2c[0].x)/2),0,360,false);
}
ctx.fill();
ctx.stroke();
break;
}
_33.style.display=(_32?"inline":"none");
return _33;
};
this.drawLine=function(_43,_44,_45,_46,_47){
var _48;
var bc=this.normalizeColor(_44);
var s="";
for(var i=0;i<_43.length;i++){
s+=_43[i].x+","+_43[i].y+" ";
}
switch(this.drawMethod){
case "svg":
_48=document.createElementNS("http://www.w3.org/2000/svg","polyline");
_48.setAttribute("points",s);
_48.setAttribute("stroke",bc.hex);
_48.setAttribute("stroke-width",_46);
_48.setAttribute("stroke-opacity",_45);
_48.setAttribute("fill","none");
break;
case "vml":
_48=document.createElement("v:polyline");
_48.style.width=this.surfaceWidth+"px";
_48.style.height=this.surfaceHeight+"px";
_48.style.position="absolute";
_48.setAttribute("stroked","true");
_48.setAttribute("coordsize",this.surfaceWidth+" "+this.surfaceHeight);
_48.setAttribute("points",s);
_48.setAttribute("fill","false");
var _4c=document.createElement("v:fill");
_4c.setAttribute("opacity",0);
_48.appendChild(_4c);
var _4d=document.createElement("v:stroke");
_4d.setAttribute("miterlimit","8.0");
_4d.setAttribute("joinstyle","miter");
_4d.setAttribute("endcap","flat");
_4d.setAttribute("opacity",_45);
_4d.setAttribute("color",bc.hex);
_4d.setAttribute("weight",_46);
_48.appendChild(_4d);
break;
case "canvas":
var _48=document.createElement("canvas");
_48.setAttribute("width",this.surfaceWidth);
_48.setAttribute("height",this.surfaceHeight);
_48.style.position="absolute";
_48.style.left="0px";
_48.style.top="0px";
var ctx=_48.getContext("2d");
ctx.strokeStyle="rgba("+bc.rgb[0]+","+bc.rgb[1]+","+bc.rgb[2]+","+_45+")";
ctx.lineWidth=_46;
ctx.beginPath();
ctx.moveTo(_43[0].x,_43[0].y);
for(var i=1;i<_43.length;i++){
ctx.lineTo(_43[i].x,_43[i].y);
}
ctx.stroke();
break;
}
_48.style.display=(_47?"inline":"none");
return _48;
};
};
MQA.Graphics.setDrawMethod();

MQA.Base=function(){
this.guid=MQA.Util._getRandomGUID(10);
this.className="MQA.base";
this.reservedProperties="guid,className,parentCollections";
this.parentCollections=[];
this.setValue=function(_1,_2){
if(typeof (this[_1])!="undefined"){
if(this.reservedProperties.search(_1)!=-1){
return false;
}
this[_1]=MQA.Util._cloneValue(_2);
if(typeof (this[_1+"_override"])=="undefined"){
this._facio(_1,this[_1]);
}
this.facio(_1,this[_1]);
return true;
}else{
return false;
}
};
this.getValue=function(_3){
var _4;
if(typeof (this[_3])!="undefined"){
_4=this.duco(_3);
if(typeof (_4)=="undefined"){
_4=this._duco(_3);
if(typeof (_4)=="undefined"){
_4=this[_3];
}
}
return _4;
}
};
this.setValues=function(_5){
var _6=0;
for(key in _5){
if(typeof (this[key])!="undefined"){
if(this.setValue(key,_5[key])){
_6++;
}
}
}
return _6;
};
this.override=function(_7){
if(!(_7 instanceof Array)){
_7=[_7];
}
for(var i=0;i<_7.length;i++){
this[_7[i]+"_override"]=1;
}
};
this._facio=function(_9,_a){
};
this.facio=function(_b,_c){
};
this._duco=function(_d){
};
this.duco=function(_e){
};
this.draw=function(){
};
this.dispose=function(){
};
};

MQA.Control=function(){
this.controlVersion="1.0";
};
MQA.Control.prototype={initialize:function(_1){
this.map=_1;
},getPosition:function(){
return this.position;
},getHeight:function(){
return this.getHeightInternal(this.elem);
},getHeightInternal:function(_2){
var _3=_2.childNodes;
var _4=0;
for(var i=0,j=_3.length;i<j;i++){
if(_3[i].childNodes.length>0&&_3[i].style.overflow!="hidden"){
childHeight=this.getHeightInternal(_3[i]);
if(childHeight>_4){
_4=childHeight;
}
}
if(_3[i].offsetHeight>_4){
_4=_3[i].offsetHeight;
}
}
return _4;
},getWidth:function(){
return this.getWidthInternal(this.elem);
},getWidthInternal:function(_7){
var _8=_7.childNodes;
var _9=0;
for(var i=0,j=_8.length;i<j;i++){
if(_8[i].childNodes.length>0&&_8[i].style.overflow!="hidden"){
childWidth=this.getWidthInternal(_8[i]);
if(childWidth>_9){
_9=childWidth;
}
}
if(_8[i].offsetWidth>_9){
_9=_8[i].offsetWidth;
}
}
return _9;
}};

MQA.RemoteCollectionResponseHandler=new function(){
this.collectionContainer=Array();
this.getCallback=function(rc){
return this.onDataReturn;
};
this.onDataReturn=function(_2){
for(var i=0;i<this.collectionContainer.length;i++){
if(this.collectionContainer[i].guid==_2){
this.collectionContainer[i].onDataReturn();
break;
}
}
};
this.onDataRequestTimeout=function(_4){
for(var i=0;i<this.collectionContainer.length;i++){
if(this.collectionContainer[i].guid==_4){
this.collectionContainer[i].onDataRequestTimeout();
break;
}
}
};
this.addInstance=function(rc){
this.collectionContainer.push(rc);
};
};
MQA.RemoteCollection=function(_7,_8,_9){
MQA.ShapeCollection.call(this);
this._returnData=null;
this._xmlHTTP=null;
this.deserializer=_8;
this.url=_7;
this.timeoutDuration=(typeof (_9)!="undefined"?_9:10000);
this.dataRequestTimer=null;
this.jsonScript=null;
this.scriptReturned=false;
this.eventHandlers=[];
EventHolder=function(){
this.eventName;
this.handler;
};
this.requestData=function(_a){
clearTimeout(this.dataRequestTimer);
this.scriptReturned=false;
if(!(this.deserializer instanceof MQA.JSONDeserializer)){
if(window.XMLHttpRequest){
this._xmlHTTP=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
this._xmlHTTP=new ActiveXObject("Microsoft.XMLHTTP");
}
}
var _b=Array();
_b.push(this.guid);
this._xmlHTTP.onreadystatechange=function(){
return MQA.RemoteCollectionResponseHandler["onDataReturn"].apply(MQA.RemoteCollectionResponseHandler,_b);
};
if(_a.indexOf("?")==-1){
_a+="?mqarand="+Math.random();
}else{
_a+="&mqarand="+Math.random();
}
this._xmlHTTP.open("GET",_a,true);
this._xmlHTTP.send(null);
}else{
this.jsonScript=document.createElement("script");
this.jsonScript.id="jsonScript";
this.jsonScript.src=_a;
this.jsonScript.type="text/javascript";
var _b=Array();
_b.push(this.guid);
if(this.deserializer.isIE){
this.jsonScript.onreadystatechange=function(){
return MQA.RemoteCollectionResponseHandler["onDataReturn"].apply(MQA.RemoteCollectionResponseHandler,_b);
};
}else{
this.jsonScript.onload=function(){
return MQA.RemoteCollectionResponseHandler["onDataReturn"].apply(MQA.RemoteCollectionResponseHandler,_b);
};
}
document.body.appendChild(this.jsonScript);
}
this.dataRequestTimer=setTimeout("MQA.RemoteCollectionResponseHandler.onDataRequestTimeout(\""+this.guid+"\")",this.timeoutDuration);
};
this.onDataReturn=function(){
if(!(this.deserializer instanceof MQA.JSONDeserializer)){
if(this._xmlHTTP.readyState==4){
if(this._xmlHTTP.status==200){
if(document.implementation&&document.implementation.createDocument){
var _c=new DOMParser();
this._returnData=_c.parseFromString(this._xmlHTTP.responseText,"text/xml");
}else{
this._returnData=new ActiveXObject("Microsoft.XMLDOM");
this._returnData.async="false";
this._returnData.loadXML(this._xmlHTTP.responseText);
}
clearTimeout(this.dataRequestTimer);
this._processData();
}
}
}else{
if((this.deserializer.isIE&&(this.jsonScript.readyState=="complete"||this.jsonScript.readyState=="loaded"))||!this.deserializer.isIE){
this.scriptReturned=true;
try{
document.body.removeChild(this.jsonScript);
}
catch(e){
}
this.jsonScript=null;
clearTimeout(this.dataRequestTimer);
this._processData();
}
}
};
this.onDataRequestTimeout=function(){
clearTimeout(this.dataRequestTimer);
if(this.deserializer instanceof MQA.JSONDeserializer){
try{
document.body.removeChild(this.jsonScript);
this.jsonScript=null;
}
catch(e){
}
}
this.dataRequestTimer=null;
var _d=new MQA.Event("MQA.RemoteCollection.dataTimeout");
_d.srcObject=this;
this.onDataTimeout(_d);
};
this._processData=function(){
var _e=this.deserializer.deserializeData(this._returnData);
for(var k=0;k<_e.length;k++){
this.add(_e[k]);
}
this.activateEventListeners();
var mqe=new MQA.Event("MQA.RemoteCollection.dataLoaded");
mqe.srcObject=this;
this.onDataLoaded(mqe);
};
this.update=function(){
this.deactivateEventListeners();
this.removeAll();
this.requestData(this.url);
};
this.getData=function(){
return this._returnData;
};
this.setTimeoutDuration=function(x){
this.timeoutDuration=x;
};
this.getTimeoutDuration=function(){
return this.timeoutDuration;
};
this.addEventListeners=function(_12,_13){
_12=_12.toLowerCase();
this.eventHandlers.push({eventName:_12,handler:_13,active:false});
this.activateEventListeners();
};
this.removeEventListeners=function(_14){
_14=_14.toLowerCase();
for(var x=0;x<this.eventHandlers.length;x++){
if(this.eventHandlers[x].eventName==_14){
for(var i=0;i<this.getSize();i++){
MQA.EventManager.removeListener(this.getAt(i),this.eventHandlers[x].eventName,this.eventHandlers[x].handler);
}
this.eventHandlers.splice(x,1);
}
}
};
this.activateEventListeners=function(){
for(var x=0;x<this.eventHandlers.length;x++){
if(!this.eventHandlers[x].active){
for(var i=0;i<this.getSize();i++){
MQA.EventManager.addListener(this.getAt(i),this.eventHandlers[x].eventName,this.eventHandlers[x].handler);
}
if(this.getSize()>0){
this.eventHandlers[x].active=true;
}
}
}
};
this.deactivateEventListeners=function(){
for(var x=0;x<this.eventHandlers.length;x++){
if(this.eventHandlers[x].active){
for(var i=0;i<this.getSize();i++){
MQA.EventManager.removeListener(this.getAt(i),this.eventHandlers[x].eventName,this.eventHandlers[x].handler);
}
if(this.getSize()>0){
this.eventHandlers[x].active=false;
}
}
}
};
this.onDataLoaded=function(mqe){
MQA.EventManager.trigger(this,"dataloaded",mqe);
};
this.onDataTimeout=function(mqe){
MQA.EventManager.trigger(this,"datatimeout",mqe);
};
MQA.RemoteCollectionResponseHandler.addInstance(this);
this.requestData(_7);
};

MQA.BaseDeserializer=function(){
var _1=null;
var _2=null;
this.isIE=(MQA.Util.getBrowserInfo().name=="msie");
this.deserializeData=function(_3){
return null;
};
this.getTextValue=function(_4){
if(MQA.Util.getBrowserInfo().name=="msie"){
return _4.text;
}else{
return _4.textContent;
}
};
};

MQA.KMLDeserializer=function(){
MQA.BaseDeserializer.call(this);
this.data=null;
this.deserializeData=function(_1){
var p;
this.data=_1;
var _3=Array();
var _4=_1.getElementsByTagName("Placemark");
for(var i=0;i<_4.length;i++){
if(_4[i].getElementsByTagName("Point").length>0){
p=this.createPois(_4[i]);
for(var x=0;x<p.length;x++){
_3.push(p[x]);
}
}else{
if(_4[i].getElementsByTagName("Polygon").length>0){
p=this.createPolygons(_4[i]);
for(var x=0;x<p.length;x++){
_3.push(p[x]);
}
}else{
if(_4[i].getElementsByTagName("LineString").length>0){
p=this.createLines(_4[i]);
for(var x=0;x<p.length;x++){
_3.push(p[x]);
}
}
}
}
}
return _3;
};
this.createPois=function(_7){
var _8=null;
var _9=Array();
var _a=MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("coordinates")[0])).split(",");
var _b=new MQA.Poi(new MQA.LatLng(_a[1],_a[0]));
if(_7.getElementsByTagName("name").length>0){
_b.setValue("infoTitleHTML",this.getTextValue(_7.getElementsByTagName("name")[0]));
}
if(_7.getElementsByTagName("description").length>0){
var _c=this.getTextValue(_7.getElementsByTagName("description")[0]);
_c=_c.replace("<![CDATA[","");
_c=_c.replace("&lt;![CDATA[","");
_c=_c.replace("]]>","");
_c=_c.replace("]]&gt;","");
_b.setValue("infoContentHTML",_c);
}
if(_7.getElementsByTagName("styleUrl").length>0){
var _d=this.getStyleInfo(this.getTextValue(_7.getElementsByTagName("styleUrl")[0]));
if(typeof (_d)!="string"){
if(_d.getElementsByTagName("Icon").length>0){
if(_d.getElementsByTagName("Icon")[0].getElementsByTagName("href").length>0){
_8=this.getTextValue(_d.getElementsByTagName("Icon")[0].getElementsByTagName("href")[0]);
}else{
if(1==2){
}else{
_8=null;
}
}
}else{
_8=null;
}
}else{
_8=_d;
}
if(_8){
_b.setValue("icon",new MQA.Icon(_8,0,0));
}
}
_9.push(_b);
return _9;
};
this.createPolygons=function(_e){
var _f,_10,_11,_12,_13;
var _14=Array();
var _15=_e.getElementsByTagName("Polygon");
for(var x=0;x<_15.length;x++){
var _17=new MQA.PolygonOverlay();
var _18=new MQA.LatLngCollection();
var _19=_e.getElementsByTagName("outerBoundaryIs");
if(_19.length>0){
var _1a=this.getTextValue(_19[0].getElementsByTagName("coordinates")[0]);
_1a=MQA.Util._trim(_1a);
_1a=_1a.split(/ +|\n+/);
if(_1a.length>0){
for(var i=0;i<_1a.length;i++){
_f=MQA.Util._trim(_1a[i]);
_f=_f.split(",");
if(_f!=""){
_18.add(new MQA.LatLng(_f[1],_f[0]));
}
}
}else{
return null;
}
}
_17.setValue("shapePoints",_18);
if(_e.getElementsByTagName("styleUrl").length>0){
_10=this.getStyleInfo(this.getTextValue(_e.getElementsByTagName("styleUrl")[0]));
if(_10){
var _1c=Array("LineStyle","PolyStyle");
for(var i=0;i<_1c.length;i++){
if(_10.getElementsByTagName(_1c[i]).length>0){
_11=_10.getElementsByTagName(_1c[i])[0];
if(_11.getElementsByTagName("width").length>0){
_12=this.getTextValue(_11.getElementsByTagName("width")[0]);
if(_12){
_17.setValue("borderWidth",_12);
}
}
if(_11.getElementsByTagName("color").length>0){
_13=this.getTextValue(_11.getElementsByTagName("color")[0]);
if(_13){
var _1d=(_1c[i]=="LineStyle"?"color":"fillColor");
var _1e=(_1c[i]=="LineStyle"?"colorAlpha":"fillColorAlpha");
var c=_13.substr(6,2)+_13.substr(4,2)+_13.substr(2,2);
_17.setValue(_1d,"#"+c);
_17.setValue(_1e,parseInt("0x"+_13.substr(0,2))/255);
}
}
}
}
}
}
_14.push(_17);
}
return _14;
};
this.createLines=function(_20){
var _21,_22,_23,_24,_25;
var _26=Array();
var _27=_20.getElementsByTagName("LineString");
for(var z=0;z<_27.length;z++){
var _29=new MQA.LineOverlay();
var _2a=new MQA.LatLngCollection();
var _2b=this.getTextValue(_27[z].getElementsByTagName("coordinates")[0]);
_2b=MQA.Util._trim(_2b);
_2b=_2b.split(/ +|\n+/);
if(_2b.length>0){
for(var i=0;i<_2b.length;i++){
_21=MQA.Util._trim(_2b[i]);
_21=_21.split(",");
if(_21!=""){
_2a.add(new MQA.LatLng(_21[1],_21[0]));
}
}
}else{
}
_29.setValue("shapePoints",_2a);
if(_20.getElementsByTagName("styleUrl").length>0){
_22=this.getStyleInfo(this.getTextValue(_20.getElementsByTagName("styleUrl")[0]));
if(_22){
var _2d=_22.getElementsByTagName("LineStyle");
if(_2d.length>0){
_23=_2d[0];
if(_23.getElementsByTagName("width").length>0){
_24=this.getTextValue(_23.getElementsByTagName("width")[0]);
if(_24){
_29.setValue("borderWidth",_24);
}
}
if(_23.getElementsByTagName("color").length>0){
_25=this.getTextValue(_23.getElementsByTagName("color")[0]);
if(_25){
var c=_25.substr(6,2)+_25.substr(4,2)+_25.substr(2,2);
_29.setValue("color","#"+c);
_29.setValue("colorAlpha",parseInt("0x"+_25.substr(0,2))/255);
}
}
}
}
}
_26.push(_29);
}
return _26;
};
this.getStyleInfo=function(_2f){
var _30=null;
if(_2f.substring(0,1)!="#"){
_30=_2f;
}else{
_2f=_2f.substring(1);
var _30=this.getNodeById("Style",_2f);
}
return _30;
};
this.getNodeById=function(_31,id){
var _33=null;
var _34=this.data.getElementsByTagName(_31);
for(var i=0;i<_34.length;i++){
if(_34[i].getAttribute("id")==id){
_33=_34[i];
break;
}
}
return _33;
};
};

MQA.GeoRSSDeserializer=function(){
MQA.BaseDeserializer.call(this);
this.data=null;
this.feedVersion=null;
this.geo="http://www.w3.org/2003/01/geo/wgs84_pos#";
this.geoRSS="http://www.georss.org/georss";
this.gml="http://www.opengis.net/gml";
this.deserializeData=function(_1){
var _2,_3,_4;
var _5=Array();
this.data=_1;
this.feedVersion=this.getFeedVersion();
_2=this.data.getElementsByTagName("item");
if(_2.length==0){
_2=this.data.getElementsByTagName("entry");
}
if(this.feedVersion=="geo"){
for(var i=0;i<_2.length;i++){
_3=this.getElements(_2[i],"lat");
_4=this.getElements(_2[i],"long");
if(_3.length>0&&_4.length>0){
_5.push(this.createPoi(_2[i]));
}
}
}else{
if(this.feedVersion=="georss"){
for(var i=0;i<_2.length;i++){
if(this.getElements(_2[i],"point").length>0){
_5.push(this.createPoi(_2[i]));
}else{
if(this.getElements(_2[i],"line").length>0){
_5.push(this.createLine(_2[i]));
}else{
if(this.getElements(_2[i],"polygon").length>0){
_5.push(this.createPolygon(_2[i]));
}else{
if(this.getElements(_2[i],"box").length>0){
_5.push(this.createRectangle(_2[i]));
}
}
}
}
}
}else{
for(var i=0;i<_2.length;i++){
if(this.getElements(_2[i],"Point").length>0){
_5.push(this.createPoi(_2[i]));
}else{
if(this.getElements(_2[i],"LineString").length>0){
_5.push(this.createLine(_2[i]));
}else{
if(this.getElements(_2[i],"Polygon").length>0){
_5.push(this.createPolygon(_2[i]));
}else{
if(this.getElements(_2[i],"Envelope").length>0){
_5.push(this.createRectangle(_2[i]));
}
}
}
}
}
}
}
return _5;
};
this.createPoi=function(_7){
var _8,_9;
var _a=null;
if(this.feedVersion=="geo"){
_8=MQA.Util._trim(this.getTextValue(this.getElements(_7,"lat")[0]));
_9=MQA.Util._trim(this.getTextValue(this.getElements(_7,"long")[0]));
_a=new MQA.Poi(new MQA.LatLng(_8,_9));
if(_7.getElementsByTagName("title").length>0){
_a.setValue("infoTitleHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("title")[0])));
}
if(_7.getElementsByTagName("description").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("description")[0])));
}else{
if(_7.getElementsByTagName("summary").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("summary")[0])));
}
}
}else{
if(this.feedVersion=="georss"){
var _b=this.getTextValue(this.getElements(_7,"point")[0]).split(/ +|\n+/);
_a=new MQA.Poi(new MQA.LatLng(_b[0],_b[1]));
if(_7.getElementsByTagName("title").length>0){
_a.setValue("infoTitleHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("title")[0])));
}
if(_7.getElementsByTagName("description").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("description")[0])));
}else{
if(_7.getElementsByTagName("summary").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("summary")[0])));
}
}
}else{
var _b=this.getTextValue(this.getElements(_7,"pos")[0]).split(/ +|\n+/);
_a=new MQA.Poi(new MQA.LatLng(_b[0],_b[1]));
if(_7.getElementsByTagName("title").length>0){
_a.setValue("infoTitleHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("title")[0])));
}
if(_7.getElementsByTagName("description").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("description")[0])));
}else{
if(_7.getElementsByTagName("summary").length>0){
_a.setValue("infoContentHTML",MQA.Util._trim(this.getTextValue(_7.getElementsByTagName("summary")[0])));
}
}
}
}
return _a;
};
this.createLine=function(_c){
var _d=null;
var _e=new MQA.LatLngCollection();
if(this.feedVersion=="georss"){
var _f=MQA.Util._trim(this.getTextValue(this.getElements(_c,"line")[0])).split(/ +|\n+/);
for(var i=0;i<_f.length;i=i+2){
_e.add(new MQA.LatLng(MQA.Util._trim(_f[i]),MQA.Util._trim(_f[i+1])));
}
_d=new MQA.LineOverlay();
_d.setValue("shapePoints",_e);
}else{
var _f=MQA.Util._trim(this.getTextValue(this.getElements(_c,"posList")[0])).split(/ +|\n+/);
for(var i=0;i<_f.length;i=i+2){
_e.add(new MQA.LatLng(MQA.Util._trim(_f[i]),MQA.Util._trim(_f[i+1])));
}
_d=new MQA.LineOverlay();
_d.setValue("shapePoints",_e);
}
return _d;
};
this.createPolygon=function(_11){
var _12=null;
var _13=new MQA.LatLngCollection();
if(this.feedVersion=="georss"){
var _14=MQA.Util._trim(this.getTextValue(this.getElements(_11,"polygon")[0])).split(/ +|\n+/);
for(var i=0;i<_14.length;i=i+2){
_13.add(new MQA.LatLng(MQA.Util._trim(_14[i]),MQA.Util._trim(_14[i+1])));
}
_12=new MQA.PolygonOverlay();
_12.setValue("shapePoints",_13);
}else{
var _16=this.getElements(_11,"exterior");
if(_16.length>0){
var _14=MQA.Util._trim(this.getTextValue(this.getElements(_16[0],"posList")[0])).split(/ +|\n+/);
for(var i=0;i<_14.length;i=i+2){
_13.add(new MQA.LatLng(MQA.Util._trim(_14[i]),MQA.Util._trim(_14[i+1])));
}
_12=new MQA.PolygonOverlay();
_12.setValue("shapePoints",_13);
}
}
return _12;
};
this.createRectangle=function(_17){
var _18=null;
var _19=new MQA.LatLngCollection();
if(this.feedVersion=="georss"){
var _1a=MQA.Util._trim(this.getTextValue(this.getElements(_17,"box")[0])).split(/ +|\n+/);
for(var i=0;i<_1a.length;i=i+2){
_19.add(new MQA.LatLng(MQA.Util._trim(_1a[i]),MQA.Util._trim(_1a[i+1])));
}
_18=new MQA.RectangleOverlay();
_18.setValue("shapePoints",_19);
}else{
var _1c=MQA.Util._trim(this.getTextValue(this.getElements(_17,"lowerCorner")[0])).split(/ +|\n+/);
var _1d=MQA.Util._trim(this.getTextValue(this.getElements(_17,"upperCorner")[0])).split(/ +|\n+/);
_19.add(new MQA.LatLng(MQA.Util._trim(_1c[0]),MQA.Util._trim(_1c[1])));
_19.add(new MQA.LatLng(MQA.Util._trim(_1d[0]),MQA.Util._trim(_1d[1])));
_18=new MQA.RectangleOverlay();
_18.setValue("shapePoints",_19);
}
return _18;
};
this.getFeedVersion=function(){
var _1e=null;
var f=this.data.getElementsByTagName("feed");
if(f.length==0){
f=this.data.getElementsByTagName("rss");
}
if(f[0].getAttribute("xmlns:georss")){
if(f[0].getAttributeNode("xmlns:gml")){
_1e="gml";
}else{
_1e="georss";
}
}else{
if(f[0].getAttributeNode("xmlns:geo")){
_1e="geo";
}
}
return _1e;
};
this.getElements=function(_20,_21){
var _22="";
var _23=null;
var _24=null;
switch(this.feedVersion){
case "geo":
_22="geo:";
_23=this.geo;
break;
case "georss":
_22="georss:";
_23=this.geoRSS;
break;
case "gml":
_22=(_21=="where"?"georss:":"gml:");
_23=(_21=="where"?this.geoRSS:this.gml);
break;
default:
_22="";
_23=null;
break;
}
if(this.isIE){
_24=_20.getElementsByTagName(_22+_21);
}else{
_24=_20.getElementsByTagNameNS(_23,_21);
}
return _24;
};
};

MQA.JSONDeserializer=function(_1){
MQA.BaseDeserializer.call(this);
this._data=null;
if(typeof (_1)=="undefined"){
this._dataProcessor=function(_2){
return null;
};
}else{
this._dataProcessor=_1;
}
this.deserializeData=function(_3){
var _4,_5,_6;
var _7=Array();
this._data=_3;
_7=this._dataProcessor(this._data);
return _7;
};
this.setDataProcessor=function(fn){
this._dataProcessor=fn;
};
};

MQA.LargeZoomControl=function(){
browser=MQA.browser;
this.pan=new Array();
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(5,30));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.ePanClick=new Array();
this.ePanMouseover=new Array();
this.ePanMouseout=new Array();
this.eZoominClick=null;
this.eZoominMouseover=null;
this.eZoominMouseout=null;
this.eZoomoutClick=null;
this.eZoomoutMouseover=null;
this.eZoomoutMouseout=null;
this.eZoomareaClick=new Array();
this.eZoomareaMouseover=new Array();
this.eZoomboxMouseout=null;
temp=document.createElement("div");
temp.className="map-controls-bg screen";
this.elem.appendChild(temp);
temp1=document.createElement("div");
temp1.style.position="relative";
temp1.style.width="48px";
temp1.style.height="45px";
temp1.style.margin="0";
temp1.style.padding="0 1px";
if(browser.name=="msie"&&browser.version<7){
temp1.style.backgroundImage="none";
temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-top-bg.png', sizingMethod='image');";
}else{
temp1.style.backgroundColor="transparent";
temp1.style.backgroundImage="url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-top-bg.png)";
temp1.style.backgroundPosition="0 0";
temp1.style.backgroundRepeat="no-repeat";
}
temp.appendChild(temp1);
temp1=document.createElement("div");
temp1.style.position="relative";
temp1.style.width="48px";
temp1.style.height="236px";
temp1.style.margin="0";
temp1.style.padding="5px 0 0";
if(browser.name=="msie"&&browser.version<7){
temp1.style.backgroundImage="none";
temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-middle-bg.png', sizingMethod='crop')";
}else{
temp1.style.backgroundColor="transparent";
temp1.style.backgroundImage="url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-middle-short-bg.png)";
temp1.style.backgroundPosition="0 0";
temp1.style.backgroundRepeat="repeat-y";
}
if(browser.name=="msie"){
temp1.style.height="241px";
}
temp.appendChild(temp1);
temp1=document.createElement("div");
temp1.style.position="relative";
temp1.style.width="48px";
temp1.style.height="18px";
temp1.style.margin="0";
temp1.style.padding="0";
if(browser.name=="msie"&&browser.version<7){
temp1.style.backgroundImage="none";
temp1.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-btm-short-bg.png', sizingMethod='image')";
}else{
temp1.style.backgroundColor="transparent";
temp1.style.backgroundImage="url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-btm-short-bg.png)";
temp1.style.backgroundPosition="0 0";
temp1.style.backgroundRepeat="no-repeat";
}
temp.appendChild(temp1);
temp=document.createElement("ul");
temp.className="map-controls screen";
this.elem.appendChild(temp);
temp1=document.createElement("li");
temp1.className="map-compass-wrapper";
temp.appendChild(temp1);
temp2=document.createElement("div");
temp2.className="map-compass";
temp1.appendChild(temp2);
temp3=document.createElement("img");
temp3.border=0;
if(browser.name=="msie"&&browser.version<7){
temp3.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
temp3.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/map-compassrose.png', sizingMethod='image')";
}else{
temp3.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-compassrose.png";
}
temp3.alt="compass rose";
temp3.className="";
temp2.appendChild(temp3);
this.compassrose=temp3;
temp3=document.createElement("img");
temp3.border=0;
temp3.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
temp3.className="map-compass-links";
temp3.useMap="#mq-zoomcontrol-linkmap";
temp2.appendChild(temp3);
this.compassroseimg=temp3;
temp3=document.createElement("map");
temp3.name="mq-zoomcontrol-linkmap";
temp3.id="mq-zoomcontrol-linkmap";
temp2.appendChild(temp3);
this.compassrosemap=temp3;
temp3.appendChild(MQA.Util.createArea("poly","14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21","#center"));
temp4=MQA.Util.createArea("rect","11,1,29,12","#north","Pan North","Pan North");
temp3.appendChild(temp4);
this.pan[MQA.PAN_NORTH]=temp4;
temp4=MQA.Util.createArea("rect","27,13,40,28","#east","Pan East","Pan East");
temp3.appendChild(temp4);
this.pan[MQA.PAN_EAST]=temp4;
temp4=MQA.Util.createArea("rect","1,13,14,28","#west","Pan West","Pan West");
temp3.appendChild(temp4);
this.pan[MQA.PAN_WEST]=temp4;
temp4=MQA.Util.createArea("rect","11,29,29,40","#south","Pan South","Pan South");
temp3.appendChild(temp4);
this.pan[MQA.PAN_SOUTH]=temp4;
temp1=document.createElement("li");
temp1.className="map-zoom";
temp.appendChild(temp1);
temp2=document.createElement("div");
temp2.className="io map-zoom-in";
temp1.appendChild(temp2);
this.zoomin=document.createElement("img");
this.zoomin.alt="Zoom In";
this.zoomin.title="Zoom In";
this.zoomin.border=0;
if(browser.name=="msie"&&browser.version<7){
this.zoomin.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.zoomin.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-in.png', sizingMethod='image')";
}else{
this.zoomin.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-in.png";
}
temp2.appendChild(this.zoomin);
var _1=document.createElement("div");
_1.className="map-zoombox";
var _2=document.createElement("img");
_2.border=0;
if(browser.name=="msie"&&browser.version<7){
_2.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
_2.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/zoombar.png', sizingMethod='image')";
}else{
_2.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/zoombar.png";
}
_1.appendChild(_2);
strHtm="<img src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a' border='0' class='map-zoom-links'/>";
strHtm+="<img src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/z-on.png' border='0' class='map-zoom-on'/>";
strHtm+="<map>";
var _3=1;
var _4=10;
for(var i=0;i<16;i++){
strHtm+="<area alt='Zoom to level "+(16-i)+"' title='Zoom to level "+(16-i)+"' shape='rect' coords='1, "+(_3+i*12)+", 22, "+(_4+i*12)+"' />";
}
strHtm+="</map>";
_1.innerHTML+=strHtm;
this.zoombox=_1;
this.zoomarea=_1.childNodes[3].childNodes;
temp1.appendChild(_1);
temp2=document.createElement("div");
temp2.className="io map-zoom-out";
temp1.appendChild(temp2);
this.zoomout=document.createElement("img");
this.zoomout.alt="Zoom Out";
this.zoomout.title="Zoom Out";
this.zoomout.border=0;
if(browser.name=="msie"&&browser.version<7){
this.zoomout.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.zoomout.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-out.png', sizingMethod='image')";
}else{
this.zoomout.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-out.png";
}
temp2.appendChild(this.zoomout);
};
MQA.LargeZoomControl.prototype=new MQA.Control();
MQA.LargeZoomControl.prototype.constructor=MQA.LargeZoomControl;
MQA.LargeZoomControl.prototype.dispose=function(){
this.map=null;
this.position=null;
this.type=null;
MQA._prEvent.delDtor(this._dth);
for(var i=0;i<4;i++){
MQA._prEvent.stopObserving(this.pan[i],"click",this.ePanClick[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseover",this.ePanMouseover[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseout",this.ePanMouseout[i]);
}
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
for(var i=0;i<16;i++){
MQA._prEvent.stopObserving(this.zoomarea[i],"click",this.eZoomareaClick[i]);
MQA._prEvent.stopObserving(this.zoomarea[i],"mouseover",this.eZoomareaMouseover[i]);
}
MQA._prEvent.stopObserving(this.zoombox,"mouseout",this.eZoomboxMouseout);
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_NORTH]);
this.pan[MQA.PAN_NORTH]=null;
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_EAST]);
this.pan[MQA.PAN_EAST]=null;
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_WEST]);
this.pan[MQA.PAN_WEST]=null;
MQA.Util._deleteDOMObject(this.pan[MQA.PAN_SOUTH]);
this.pan[MQA.PAN_SOUTH]=null;
this.pan=null;
for(var i=0;i<16;i++){
MQA.Util._deleteDOMObject(this.zoomarea[0]);
}
this.zoomarea=null;
MQA.Util._deleteDOMObject(this.zoomin);
this.zoomin=null;
MQA.Util._deleteDOMObject(this.zoomout);
this.zoomout=null;
this.zoombox.innerHTML=null;
this.zoombox.outerHTML="";
MQA.Util._deleteDOMObject(this.zoombox);
this.zoombox=null;
this.compassroseimg.src="";
MQA.Util._deleteDOMObject(this.compassroseimg);
this.compassroseimg=null;
this.compassrose.src="";
MQA.Util._deleteDOMObject(this.compassrose);
this.compassrose=null;
this.compassrosemap.innerHTML=null;
this.compassrosemap.outerHTML="";
MQA.Util._deleteDOMObject(this.compassrosemap);
this.compassrosemap=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.LargeZoomControl.prototype.destructor=function(){
for(var i=0;i<4;i++){
MQA._prEvent.stopObserving(this.pan[i],"click",this.ePanClick[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseover",this.ePanMouseover[i]);
MQA._prEvent.stopObserving(this.pan[i],"mouseout",this.ePanMouseout[i]);
}
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
for(var i=0;i<16;i++){
MQA._prEvent.stopObserving(this.zoomarea[i],"click",this.eZoomareaClick[i]);
MQA._prEvent.stopObserving(this.zoomarea[i],"mouseover",this.eZoomareaMouseover[i]);
}
MQA._prEvent.stopObserving(this.zoombox,"mouseout",this.eZoomboxMouseout);
this.elem.parentNode.removeChild(this.elem);
};
MQA.LargeZoomControl.prototype.initialize=function(_8){
this.map=_8;
this.type=MQA.CONTROL_PANZOOM;
this.setZoom(this.map.getZoomLevel());
this.compassroseimg.useMap="#mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.compassrosemap.name="mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.compassrosemap.id="mq-zoomcontrol-linkmap"+this.map.uniqueMapID;
this.zoombox.childNodes[1].useMap="#zoompositions"+this.map.uniqueMapID;
this.zoombox.childNodes[3].name="zoompositions"+this.map.uniqueMapID;
this.zoombox.childNodes[3].id="zoompositions"+this.map.uniqueMapID;
for(var i=0;i<4;i++){
this.ePanClick[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.ePanMouseover[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.ePanMouseout[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.pan[i],"click",this.ePanClick[i]);
MQA._prEvent.observe(this.pan[i],"mouseover",this.ePanMouseover[i]);
MQA._prEvent.observe(this.pan[i],"mouseout",this.ePanMouseout[i]);
}
this.eZoominClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.observe(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.observe(this.zoomin,"mouseout",this.eZoominMouseout);
this.eZoomoutClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.observe(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.observe(this.zoomout,"mouseout",this.eZoomoutMouseout);
for(var i=0;i<16;i++){
this.eZoomareaClick[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomareaMouseover[i]=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomarea[i],"click",this.eZoomareaClick[i]);
MQA._prEvent.observe(this.zoomarea[i],"mouseover",this.eZoomareaMouseover[i]);
}
this.eZoomboxMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoombox,"mouseout",this.eZoomboxMouseout);
};
MQA.LargeZoomControl.prototype.eventmonitor=function(_a){
if(typeof (MQA)=="undefined"){
return;
}
eventId="";
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_NORTH]){
eventId="n";
}
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_SOUTH]){
eventId="s";
}
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_EAST]){
eventId="e";
}
if(MQA._prEvent.element(_a)==this.pan[MQA.PAN_WEST]){
eventId="w";
}
if(MQA._prEvent.element(_a)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(_a)==this.zoomout){
eventId="out";
}
if(MQA._prEvent.element(_a)==this.zoombox.childNodes[1]){
return;
}
for(var i=0;i<16;i++){
if(MQA._prEvent.element(_a)==this.zoomarea[i]){
eventId=16-i;
break;
}
}
switch(_a.type){
case "click":
switch(eventId){
case "in":
if(this.map.getZoomLevel()<16){
this.map.zoomIn();
}
break;
case "out":
this.map.zoomOut();
break;
case "n":
this.map.panNorth(50);
break;
case "s":
this.map.panSouth(50);
break;
case "e":
this.map.panEast(50);
break;
case "w":
this.map.panWest(50);
break;
case "nil":
break;
default:
this.map.setZoomLevel(eventId);
break;
}
break;
case "mouseover":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(_a).className="o";
break;
case "n":
this.compassrose.className="n";
break;
case "s":
this.compassrose.className="s";
break;
case "e":
this.compassrose.className="e";
break;
case "w":
this.compassrose.className="w";
break;
default:
this.selectZoom(eventId);
break;
}
break;
case "mouseout":
switch(eventId){
case "in":
case "out":
if(MQA._prEvent.element(_a).className!="o"){
return;
}
MQA._prEvent.element(_a).className="";
break;
case "n":
case "s":
case "e":
case "w":
this.compassrose.className="";
break;
default:
if(parseFloat(eventId)!=this.map.getZoomLevel()){
this.unselectZoom(eventId);
}
break;
}
break;
}
};
MQA.LargeZoomControl.prototype.setZoom=function(_c){
var z=this.zoombox.childNodes[2];
z.style.top=((16-_c)*12+1)+"px";
z.alt="Zoom to level "+(_c);
z.title="Zoom to level "+(_c);
};
MQA.LargeZoomControl.prototype.selectZoom=function(_e){
this.zoombox.childNodes[0].style.left=0-((17-_e)*25)+"px";
};
MQA.LargeZoomControl.prototype.unselectZoom=function(_f){
this.zoombox.childNodes[0].style.left="0";
};
MQA.LargeZoomControl.prototype.getHeight=function(){
return 298;
};
MQA.LargeZoomControl.prototype.getWidth=function(){
return 45;
};
MQA.PanControl=function(){
browser=MQA.browser;
this.pans=new Array();
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(0,30));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.bgdiv=document.createElement("div");
this.bgdiv.className="map-controls-bg screen";
this.elem.appendChild(this.bgdiv);
this.boxdiv=document.createElement("div");
this.boxdiv.style.position="relative";
this.boxdiv.style.width="48px";
this.boxdiv.style.height="52px";
this.boxdiv.style.margin="0";
this.boxdiv.style.padding="0 3px";
if(browser.name=="msie"&&browser.version<7){
this.boxdiv.style.backgroundImage="none";
this.boxdiv.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-box-bg.png', sizingMethod='image')";
}else{
this.boxdiv.style.backgroundColor="transparent";
this.boxdiv.style.backgroundImage="url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-controls-box-bg.png)";
this.boxdiv.style.backgroundPosition="0 0";
this.boxdiv.style.backgroundRepeat="no-repeat";
}
this.bgdiv.appendChild(this.boxdiv);
this.ul=document.createElement("ul");
this.ul.className="map-controls screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-box-wrapper";
this.ul.appendChild(this.li1);
this.mapcompass=document.createElement("div");
this.mapcompass.className="map-compass";
this.li1.appendChild(this.mapcompass);
this.roseimg=document.createElement("img");
this.roseimg.border=0;
if(browser.name=="msie"&&browser.version<7){
this.roseimg.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.roseimg.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-compassrose.png', sizingMethod='image')";
}else{
this.roseimg.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/map-compassrose.png";
}
this.roseimg.alt="compass rose";
this.roseimg.className="";
this.mapcompass.appendChild(this.roseimg);
this.compassrose=this.roseimg;
this.mapimg=document.createElement("img");
this.mapimg.border=0;
this.mapimg.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.mapimg.className="map-compass-links";
this.mapimg.useMap="#mq-pancontrol-linkmap";
this.mapcompass.appendChild(this.mapimg);
this.mapitem=document.createElement("map");
this.mapitem.id="mq-pancontrol-linkmap";
this.mapitem.name="mq-pancontrol-linkmap";
this.mapcompass.appendChild(this.mapitem);
this.area1=MQA.Util.createArea("poly","14,21,16,16,21,14,25,16,27,21,25,25,21,27,16,25,14,21,14,21","#center");
this.mapitem.appendChild(this.area1);
this.pans[MQA.PAN_NORTH]=MQA.Util.createArea("rect","11,1,29,12","#north","Pan North","Pan North");
this.mapitem.appendChild(this.pans[MQA.PAN_NORTH]);
this.pans[MQA.PAN_EAST]=MQA.Util.createArea("rect","27,13,40,28","#east","Pan East","Pan East");
this.mapitem.appendChild(this.pans[MQA.PAN_EAST]);
this.pans[MQA.PAN_WEST]=MQA.Util.createArea("rect","1,13,14,28","#west","Pan West","Pan West");
this.mapitem.appendChild(this.pans[MQA.PAN_WEST]);
this.pans[MQA.PAN_SOUTH]=MQA.Util.createArea("rect","11,29,29,40","#south","Pan South","Pan South");
this.mapitem.appendChild(this.pans[MQA.PAN_SOUTH]);
};
MQA.PanControl.prototype=new MQA.Control();
MQA.PanControl.prototype.constructor=MQA.PanControl;
MQA.PanControl.prototype.dispose=function(){
this.map=null;
this.position=null;
this.type=null;
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"click",this.ePanNorthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseover",this.ePanNorthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseout",this.ePanNorthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"click",this.ePanSouthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseover",this.ePanSouthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseout",this.ePanSouthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"click",this.ePanEastClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseover",this.ePanEastMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseout",this.ePanEastMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"click",this.ePanWestClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseover",this.ePanWestMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseout",this.ePanWestMouseOut);
this.pans[MQA.PAN_NORTH]=null;
this.pans[MQA.PAN_SOUTH]=null;
this.pans[MQA.PAN_EAST]=null;
this.pans[MQA.PAN_WEST]=null;
this.pans=null;
MQA.Util._deleteDOMObject(this.compassrose);
this.compassrose=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1=null;
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul=null;
this.mapitem.innerHTML=null;
this.mapitem.outerHTML="";
MQA.Util._deleteDOMObject(this.mapitem);
this.mapitem=null;
this.roseimg.src="";
MQA.Util._deleteDOMObject(this.roseimg);
this.roseimg=null;
this.mapimg.src="";
MQA.Util._deleteDOMObject(this.mapimg);
this.mapimg=null;
this.mapcompass.innerHTML=null;
this.mapcompass.outerHTML="";
MQA.Util._deleteDOMObject(this.mapcompass);
this.mapcompass=null;
this.area1.outerHTML="";
MQA.Util._deleteDOMObject(this.area1);
this.area1=null;
this.boxdiv.innerHTML=null;
this.boxdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.boxdiv);
this.boxdiv=null;
this.bgdiv.innerHTML=null;
this.bgdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.bgdiv);
this.bgdiv=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.PanControl.prototype.destructor=function(){
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"click",this.ePanNorthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseover",this.ePanNorthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_NORTH],"mouseout",this.ePanNorthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"click",this.ePanSouthClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseover",this.ePanSouthMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_SOUTH],"mouseout",this.ePanSouthMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"click",this.ePanEastClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseover",this.ePanEastMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_EAST],"mouseout",this.ePanEastMouseOut);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"click",this.ePanWestClick);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseover",this.ePanWestMouseOver);
MQA._prEvent.stopObserving(this.pans[MQA.PAN_WEST],"mouseout",this.ePanWestMouseOut);
this.elem.parentNode.removeChild(this.elem);
};
MQA.PanControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_PAN;
this.ePanNorthClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanNorthMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanNorthMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_NORTH],"click",this.ePanNorthClick);
MQA._prEvent.observe(this.pans[MQA.PAN_NORTH],"mouseover",this.ePanNorthMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_NORTH],"mouseout",this.ePanNorthMouseOut);
this.ePanSouthClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanSouthMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanSouthMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_SOUTH],"click",this.ePanSouthClick);
MQA._prEvent.observe(this.pans[MQA.PAN_SOUTH],"mouseover",this.ePanSouthMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_SOUTH],"mouseout",this.ePanSouthMouseOut);
this.ePanEastClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanEastMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanEastMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_EAST],"click",this.ePanEastClick);
MQA._prEvent.observe(this.pans[MQA.PAN_EAST],"mouseover",this.ePanEastMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_EAST],"mouseout",this.ePanEastMouseOut);
this.ePanWestClick=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanWestMouseOver=MQA._prEvent.EventCallback(this,"eventmonitors");
this.ePanWestMouseOut=MQA._prEvent.EventCallback(this,"eventmonitors");
MQA._prEvent.observe(this.pans[MQA.PAN_WEST],"click",this.ePanWestClick);
MQA._prEvent.observe(this.pans[MQA.PAN_WEST],"mouseover",this.ePanWestMouseOver);
MQA._prEvent.observe(this.pans[MQA.PAN_WEST],"mouseout",this.ePanWestMouseOut);
};
MQA.PanControl.prototype.eventmonitors=function(evt){
if(typeof (MQA)=="undefined"){
return;
}
eventId="";
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_NORTH]){
eventId="n";
}
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_SOUTH]){
eventId="s";
}
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_EAST]){
eventId="e";
}
if(MQA._prEvent.element(evt)==this.pans[MQA.PAN_WEST]){
eventId="w";
}
switch(evt.type){
case "click":
switch(eventId){
case "n":
this.map.panNorth(50);
break;
case "s":
this.map.panSouth(50);
break;
case "e":
this.map.panEast(50);
break;
case "w":
this.map.panWest(50);
break;
}
break;
case "mouseover":
switch(eventId){
case "n":
this.compassrose.className="n";
break;
case "s":
this.compassrose.className="s";
break;
case "e":
this.compassrose.className="e";
break;
case "w":
this.compassrose.className="w";
break;
}
break;
case "mouseout":
this.compassrose.className="";
break;
}
};
MQA.PanControl.prototype.getHeight=function(){
return 48;
};
MQA.PanControl.prototype.getWidth=function(){
return 47;
};
MQA.ZoomControl=function(){
browser=MQA.browser;
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(0,30));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.eZoominClick=null;
this.eZoominMouseover=null;
this.eZoominMouseout=null;
this.eZoomoutClick=null;
this.eZoomoutMouseover=null;
this.eZoomoutMouseout=null;
this.bgdiv=document.createElement("div");
this.bgdiv.className="map-controls-bg screen";
this.bgdiv.style.width="60px";
this.elem.appendChild(this.bgdiv);
this.imgdiv=document.createElement("div");
this.imgdiv.style.position="relative";
this.imgdiv.style.width="60px";
this.imgdiv.style.height="45px";
this.imgdiv.style.margin="0";
this.imgdiv.style.padding="0";
if(browser.name=="msie"&&browser.version<7){
this.imgdiv.style.backgroundImage="none";
this.imgdiv.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/zoom-bg-tilemap.png', sizingMethod='image')";
}else{
this.imgdiv.style.backgroundColor="transparent";
this.imgdiv.style.backgroundImage="url("+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/zoom-bg-tilemap.png)";
this.imgdiv.style.backgroundPosition="0 0";
this.imgdiv.style.backgroundRepeat="no-repeat";
}
this.bgdiv.appendChild(this.imgdiv);
this.ul=document.createElement("ul");
this.ul.className="map-controls screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-zoom";
this.li1.style.width="60px";
this.li1.style.height="50px";
this.ul.appendChild(this.li1);
this.indiv=document.createElement("div");
this.indiv.style.position="absolute";
this.indiv.style.left="6px";
this.indiv.style.top="8px";
this.indiv.style.width="22px";
this.indiv.className="io map-zoom-in";
this.li1.appendChild(this.indiv);
this.zoomin=document.createElement("img");
this.zoomin.alt="Zoom In";
this.zoomin.title="Zoom In";
this.zoomin.border=0;
if(browser.name=="msie"&&browser.version<7){
this.zoomin.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.zoomin.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-in.png', sizingMethod='image')";
}else{
this.zoomin.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-in.png";
}
this.indiv.appendChild(this.zoomin);
this.outdiv=document.createElement("div");
this.outdiv.style.position="absolute";
this.outdiv.style.left="29px";
this.outdiv.style.top="6px";
this.outdiv.style.width="22px";
this.outdiv.className="io map-zoom-out";
this.li1.appendChild(this.outdiv);
this.zoomout=document.createElement("img");
this.zoomout.alt="Zoom Out";
this.zoomout.title="Zoom Out";
this.zoomout.border=0;
if(browser.name=="msie"&&browser.version<7){
this.zoomout.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.zoomout.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-out.png', sizingMethod='image')";
}else{
this.zoomout.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/z-out.png";
}
this.outdiv.appendChild(this.zoomout);
};
MQA.ZoomControl.prototype=new MQA.Control();
MQA.ZoomControl.prototype.constructor=MQA.ZoomControl;
MQA.ZoomControl.prototype.dispose=function(){
this.map=null;
this.type=null;
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
this.outdiv.innerHTML=null;
this.outdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.outdiv);
this.outdiv=null;
this.zoomout.src="";
MQA.Util._deleteDOMObject(this.zoomout);
this.zoomout=null;
this.zoomin.src="";
MQA.Util._deleteDOMObject(this.zoomin);
this.zoomin=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1="";
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul="";
this.imgdiv.innerHTML=null;
this.imgdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.imgdiv);
this.imgdiv="";
this.bgdiv.innerHTML=null;
this.bgdiv.outerHTML="";
MQA.Util._deleteDOMObject(this.bgdiv);
this.bgdiv="";
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem="";
};
MQA.ZoomControl.prototype.destructor=function(){
MQA._prEvent.stopObserving(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.stopObserving(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.stopObserving(this.zoomin,"mouseout",this.eZoominMouseout);
MQA._prEvent.stopObserving(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.stopObserving(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.stopObserving(this.zoomout,"mouseout",this.eZoomoutMouseout);
this.elem.parentNode.removeChild(this.elem);
};
MQA.ZoomControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_ZOOM;
this.eZoominClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoominMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomin,"click",this.eZoominClick);
MQA._prEvent.observe(this.zoomin,"mouseover",this.eZoominMouseover);
MQA._prEvent.observe(this.zoomin,"mouseout",this.eZoominMouseout);
this.eZoomoutClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseover=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eZoomoutMouseout=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.zoomout,"click",this.eZoomoutClick);
MQA._prEvent.observe(this.zoomout,"mouseover",this.eZoomoutMouseover);
MQA._prEvent.observe(this.zoomout,"mouseout",this.eZoomoutMouseout);
};
MQA.ZoomControl.prototype.eventmonitor=function(evt){
if(typeof (MQA)=="undefined"){
return;
}
eventId="";
if(MQA._prEvent.element(evt)==this.zoomin){
eventId="in";
}
if(MQA._prEvent.element(evt)==this.zoomout){
eventId="out";
}
switch(evt.type){
case "click":
switch(eventId){
case "in":
if(this.map.getZoomLevel()<16){
this.map.zoomIn();
}
break;
case "out":
this.map.zoomOut();
break;
default:
this.map.setZoomLevel(eventId);
break;
}
break;
case "mouseover":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(evt).className="o";
break;
default:
MQA._prEvent.element(evt).src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/z-on.png";
}
break;
case "mouseout":
switch(eventId){
case "in":
case "out":
MQA._prEvent.element(evt).className="";
break;
default:
if(parseFloat(eventId)!=this.map.getZoomLevel()){
MQA._prEvent.element(evt).src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqmaptiled/z-"+eventId+".png";
}
}
break;
}
};
MQA.ZoomControl.prototype.getHeight=function(){
return 40;
};
MQA.ZoomControl.prototype.getWidth=function(){
return 62;
};
MQA.ViewControl=function(){
browser=MQA.browser;
this.map=null;
this.position=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_RIGHT,new MQA.Size(150,0));
this.elem=document.createElement("div");
this.elem.style.position="absolute";
this.elem.style.overflow="visible";
this.ul=document.createElement("ul");
this.ul.className="map-view screen";
this.elem.appendChild(this.ul);
this.li1=document.createElement("li");
this.li1.className="map-view-street";
this.ul.appendChild(this.li1);
this.streetview=document.createElement("img");
this.streetview.className="";
this.streetview.border=0;
if(browser.name=="msie"&&browser.version<7){
this.streetview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.streetview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-street-view.png', sizingMethod='image')";
}else{
this.streetview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-street-view.png";
}
this.streetview.alt="View Street Map";
this.streetview.title="View Street Map";
this.li1.appendChild(this.streetview);
this.li2=document.createElement("li");
this.li2.className="map-view-aerial";
this.ul.appendChild(this.li2);
this.aerialview=document.createElement("img");
this.aerialview.className="";
this.aerialview.border=0;
if(browser.name=="msie"&&browser.version<7){
this.aerialview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.aerialview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-aerial-view.png', sizingMethod='image')";
}else{
this.aerialview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-aerial-view.png";
}
this.aerialview.alt="View Aerial Image";
this.aerialview.title="View Aerial Image";
this.li2.appendChild(this.aerialview);
this.li3=document.createElement("li");
this.li3.className="map-view-hybrid";
this.ul.appendChild(this.li3);
this.hybridview=document.createElement("img");
this.hybridview.className="";
this.hybridview.border=0;
if(browser.name=="msie"&&browser.version<7){
this.hybridview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
this.hybridview.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-hybrid-view.png', sizingMethod='image')";
}else{
this.hybridview.src=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtoolkit/icon-btn-hybrid-view.png";
}
this.hybridview.alt="View Hybrid Map";
this.hybridview.title="View Hybrid Map";
this.li3.appendChild(this.hybridview);
};
MQA.ViewControl.prototype=new MQA.Control();
MQA.ViewControl.prototype.constructor=MQA.ViewControl;
MQA.ViewControl.prototype.dispose=function(){
this.map=null;
this.type=null;
this.position=null;
MQA._prEvent.stopObserving(this.streetview,"click",this.eStreetClick);
MQA._prEvent.stopObserving(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.stopObserving(this.streetview,"mouseout",this.eStreetMouseOut);
MQA._prEvent.stopObserving(this.aerialview,"click",this.eArialClick);
MQA._prEvent.stopObserving(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.stopObserving(this.aerialview,"mouseout",this.eArialMouseOut);
MQA._prEvent.stopObserving(this.hybridview,"click",this.eHybridClick);
MQA._prEvent.stopObserving(this.hybridview,"mouseover",this.eHybridMouseOver);
MQA._prEvent.stopObserving(this.hybridview,"mouseout",this.eHybridMouseOut);
this.streetview.src="";
MQA.Util._deleteDOMObject(this.streetview);
this.streetview=null;
this.aerialview.src="";
MQA.Util._deleteDOMObject(this.aerialview);
this.aerialview=null;
this.hybridview.src="";
MQA.Util._deleteDOMObject(this.hybridview);
this.hybridview=null;
this.li1.innerHTML=null;
this.li1.outerHTML="";
MQA.Util._deleteDOMObject(this.li1);
this.li1=null;
this.li2.innerHTML=null;
this.li2.outerHTML="";
MQA.Util._deleteDOMObject(this.li2);
this.li2=null;
this.li3.innerHTML=null;
this.li3.outerHTML="";
MQA.Util._deleteDOMObject(this.li3);
this.li3=null;
this.ul.innerHTML=null;
this.ul.outerHTML="";
MQA.Util._deleteDOMObject(this.ul);
this.ul=null;
this.elem.innerHTML=null;
this.elem.outerHTML="";
MQA.Util._deleteDOMObject(this.elem);
this.elem=null;
};
MQA.ViewControl.prototype.destructor=function(){
MQA._prEvent.stopObserving(this.streetview,"click",this.eStreetClick);
MQA._prEvent.stopObserving(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.stopObserving(this.streetview,"mouseout",this.eStreetMouseOut);
MQA._prEvent.stopObserving(this.aerialview,"click",this.eArialClick);
MQA._prEvent.stopObserving(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.stopObserving(this.aerialview,"mouseout",this.eArialMouseOut);
MQA._prEvent.stopObserving(this.hybridview,"click",this.eHybridClick);
MQA._prEvent.stopObserving(this.hybridview,"mouseover",this.eHybridMouseOver);
MQA._prEvent.stopObserving(this.hybridview,"mouseout",this.eHybridMouseOut);
this.elem.parentNode.removeChild(this.elem);
};
MQA.ViewControl.prototype.initialize=function(map){
this.map=map;
this.type=MQA.CONTROL_TYPE;
this.eStreetClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eStreetMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.streetview,"click",this.eStreetClick);
MQA._prEvent.observe(this.streetview,"mouseover",this.eStreetMouseOver);
MQA._prEvent.observe(this.streetview,"mouseout",this.eStreetMouseOut);
this.eArialClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eArialMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.aerialview,"click",this.eArialClick);
MQA._prEvent.observe(this.aerialview,"mouseover",this.eArialMouseOver);
MQA._prEvent.observe(this.aerialview,"mouseout",this.eArialMouseOut);
this.eHybridClick=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eHybridMouseOver=MQA._prEvent.EventCallback(this,"eventmonitor");
this.eHybridMouseOut=MQA._prEvent.EventCallback(this,"eventmonitor");
MQA._prEvent.observe(this.hybridview,"click",this.eHybridClick);
MQA._prEvent.observe(this.hybridview,"mouseover",this.eHybridMouseOver);
MQA._prEvent.observe(this.hybridview,"mouseout",this.eHybridMouseOut);
if(this.map.getMapType()==MQA.MAP_TYPE.MAP){
this.streetview.className="a";
}
if(this.map.getMapType()==MQA.MAP_TYPE.SAT){
this.aerialview.className="a";
}
if(this.map.getMapType()==MQA.MAP_TYPE.HYB){
this.hybridview.className="a";
}
};
MQA.ViewControl.prototype.eventmonitor=function(evt){
if(typeof (MQA)=="undefined"){
return;
}
var _16=MQA._prEvent.element(evt);
switch(evt.type){
case "click":
if(_16==this.streetview){
this.selectMode("street");
}
if(_16==this.aerialview){
this.selectMode("aerial");
}
if(_16==this.hybridview){
this.selectMode("hybrid");
}
break;
case "mouseover":
if(_16.className!="a"){
_16.className="o";
}
break;
case "mouseout":
if(_16.className!="a"){
_16.className="";
}
break;
}
};
MQA.ViewControl.prototype.updateControl=function(_17){
switch(_17){
case MQA.MAP_TYPE.MAP:
this.aerialview.className="";
this.hybridview.className="";
this.streetview.className="a";
break;
case MQA.MAP_TYPE.SAT:
this.hybridview.className="";
this.streetview.className="";
this.aerialview.className="a";
break;
case MQA.MAP_TYPE.HYB:
this.aerialview.className="";
this.streetview.className="";
this.hybridview.className="a";
break;
}
};
MQA.ViewControl.prototype.selectMode=function(_18){
var _19=this.map.getMapType();
var _1a="noChange";
if(_18=="street"&&_19!=MQA.MAP_TYPE.MAP){
_1a=MQA.MAP_TYPE.MAP;
}
if(_18=="aerial"&&_19!=MQA.MAP_TYPE.SAT){
_1a=MQA.MAP_TYPE.SAT;
}
if(_18=="hybrid"&&_19!=MQA.MAP_TYPE.HYB){
_1a=MQA.MAP_TYPE.HYB;
}
if(_1a!="noChange"){
this.map.setMapType(_1a);
}
};
MQA.ViewControl.prototype.getHeight=function(){
return 22;
};
MQA.ViewControl.prototype.getWidth=function(){
return 209;
};

MQA.TrafficControl=function(_1,_2){
MQA.Base.call(this);
this.controlVersion="2.0";
this.type=MQA.CONTROL_TRAFFIC;
this.map=null;
var _3=true;
this.position=(typeof (_1)!="undefined"?_1:new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(90,0)));
this.legendPosition=(typeof (_2)!="undefined"?_2:new MQA.MapCornerPlacement(MQA.MapCorner.BOTTOM_RIGHT,new MQA.Size(-10,-40)));
this.width=83;
this.height=25;
this.legendWidth=232;
this.legendHeight=187;
this.controlOn=false;
this.legendMode=2;
this.imageServerPath=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/";
this.trafficButtonURL=this.imageServerPath+"trafficbuttons.png";
this.legendFrameImage=this.imageServerPath+"legend_frame.png";
var _4="Traffic Data &copy; 2008 INRIX";
var _5=100;
var _6=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a";
var _7=10;
var _8=6;
var _9=16;
var _a=13;
var _b=14;
var _c=1;
var _d=15;
var _e=13;
var _f=17;
this.legendIconImages=[];
this.legendIconImages[0]=new MQA.Icon(this.imageServerPath+"legend_red_triangle.png",22,20);
this.legendIconImages[1]=new MQA.Icon(this.imageServerPath+"legend_orange_triangle.png",22,20);
this.legendIconImages[2]=new MQA.Icon(this.imageServerPath+"legend_yellow_triangle.png",22,20);
this.legendIconText=["Severe","Moderate","Minor"];
this.legendIconsVisible=true;
this.legendHelpLinkVisible=false;
this.legendFlowColors=["#EE3939","#FEDC55","#65B565","#2F0000"];
this.legendFlowText=["Stop and Go","Slowing","Normal","Road Closed"];
this.legendFlowVisible=true;
this.legendCheckboxes=[true,true,false];
this.showIncidents=this.legendCheckboxes[0];
this.showConstruction=this.legendCheckboxes[1];
this.showEvents=this.legendCheckboxes[2];
this.legendSliderVisible=false;
this.slider=null;
this.traffic=null;
this.legendDiv=null;
this.titleBarDiv=null;
this.titleBarButtonDiv=null;
this.titleBarButtonInsideDiv=null;
this.refreshLinkDiv=null;
this.checkBoxContainerDiv=null;
this.incidentCheckDiv=null;
this.constructionCheckDiv=null;
this.eventCheckDiv=null;
this.helpLinkDiv=null;
this.eTitleBarHandler=null;
this.eTitleBarButtonClick=null;
this.eRefreshLinkClick=null;
this.eCheckBoxClick=null;
this.eHelpLinkClick=null;
this.isDragging=false;
this.mouseStartX=0;
this.mouseStartY=0;
this.shapeStartX=0;
this.shapeStartY=0;
this._facio=function(key,_11){
switch(key){
case "legendMode":
if(this.controlOn){
this._drawLegend(_11);
}
break;
case "legendCheckboxes":
this.showIncidents=_11[0];
this.showConstruction=_11[1];
this.showEvents=_11[2];
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "legendIconImages":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "legendIconText":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "legendIconsVisible":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "legendFlowVisible":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "legendSliderVisible":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
case "position":
if(this.trafficButtonDiv){
this.draw();
}
break;
case "legendHelpLinkVisible":
if(this.controlOn){
this._drawLegend(this.legendMode);
}
break;
}
};
this._duco=function(key){
};
this.draw=function(){
if(this.trafficButtonDiv){
this.dispose(false);
}else{
this.traffic=new MQA.Traffic(this.map);
}
this.trafficButtonDiv=document.createElement("div");
var _13=this._getPositionXY(this.position);
this.trafficButtonDiv.style.left=_13.x+"px";
this.trafficButtonDiv.style.top=_13.y+"px";
this.trafficButtonDiv.style.width=this.width+"px";
this.trafficButtonDiv.style.height=this.height+"px";
this.trafficButtonDiv.style.position="absolute";
this.trafficButtonDiv.style.overflow="hidden";
this.trafficButtonDiv.id="trafficButtonDiv";
this.trafficButtonImage=document.createElement("img");
this.trafficButtonImage.style.position="absolute";
this.trafficButtonImage.style.border=0;
this.trafficButtonImage.style.left="0px";
this.trafficButtonImage.style.top="0px";
this.trafficButtonImage.alt="View Traffic";
this.trafficButtonImage.title="View Traffic";
this.trafficButtonImage.id="trafficButtonImage";
if(MQA.browser.name=="msie"&&MQA.browser.version<7){
this.trafficButtonImage.src=_6;
this.trafficButtonImage.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\""+this.trafficButtonURL+"\", sizingMethod=\"image\")";
}else{
this.trafficButtonImage.src=this.trafficButtonURL;
}
this.trafficButtonDiv.appendChild(this.trafficButtonImage);
this.map.parent2.appendChild(this.trafficButtonDiv);
this.eTrafficButtonClick=MQA._prEvent.EventCallback(this,"buttonEventMonitor");
this.eTrafficButtonMouseOver=MQA._prEvent.EventCallback(this,"buttonEventMonitor");
this.eTrafficButtonMouseOut=MQA._prEvent.EventCallback(this,"buttonEventMonitor");
MQA._prEvent.observe(this.trafficButtonImage,"click",this.eTrafficButtonClick);
MQA._prEvent.observe(this.trafficButtonImage,"mouseover",this.eTrafficButtonMouseOver);
MQA._prEvent.observe(this.trafficButtonImage,"mouseout",this.eTrafficButtonMouseOut);
};
this.dispose=function(_14){
var _14=(typeof (_14)!="undefined"?_14:true);
if(this.traffic.flowActive){
this.traffic.removeFlow();
}
if(this.traffic.incidentsActive){
this.traffic.removeIncidents();
}
if(this.traffic.marketsActive){
this.traffic.removeMarkets();
}
if(this.controlOn){
this._removeLegend(true);
}
this.controlOn=false;
MQA._prEvent.stopObserving(this.trafficButtonImage,"click",this.eTrafficButtonClick);
MQA._prEvent.stopObserving(this.trafficButtonImage,"mouseover",this.eTrafficButtonMouseOver);
MQA._prEvent.stopObserving(this.trafficButtonImage,"mouseout",this.eTrafficButtonMouseOut);
this.trafficButtonDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.trafficButtonDiv);
MQA.Util._deleteDOMObject(this.trafficButtonDiv);
this.trafficButtonDiv=null;
this.trafficButtonImage=null;
if(_14){
this.traffic=null;
this.map=null;
}
};
this._drawLegend=function(_15){
if(this.legendDiv){
this._removeLegend();
}
var _16=this._calculateLegendSize(_15);
this.legendWidth=_16.x;
this.legendHeight=_16.y;
var _17=19;
var _18=11;
var _19=274;
var _1a=342;
var _1b=278;
var _1c=363;
var _1d=23;
var _1e=_9;
var _1f=10;
this.legendDiv=document.createElement("div");
var _20=this._getPositionXY(this.legendPosition,"legend");
this.legendDiv.style.left=_20.x+"px";
this.legendDiv.style.top=_20.y+"px";
this.legendDiv.style.width=this.legendWidth+"px";
this.legendDiv.style.height=this.legendHeight+"px";
this.legendDiv.unselectable="on";
this.legendDiv.style.border="none";
this.legendDiv.style.position="absolute";
this.legendDiv.id="legendDiv";
var _21=[];
for(var i=0;i<9;i++){
_21[i]=document.createElement("div");
_21[i].unselectable="on";
_21[i].style.position="absolute";
_21[i].style.overflow="hidden";
_21[i].id="legendBorders"+i;
var _23=document.createElement("div");
_23.unselectable="on";
_23.id="insideDiv";
_23.style.width=_1b+"px";
_23.style.height=_1c+"px";
if(MQA.browser.name=="msie"&&(MQA.browser.version<7)){
_23.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.legendFrameImage+"', sizingMethod='scale')";
}else{
_23.style.background="url(\""+this.legendFrameImage+"\") no-repeat";
}
_21[i].appendChild(_23);
}
_21[0].style.left="0px";
_21[0].style.top="0px";
_21[0].style.width=_17+"px";
_21[0].style.height=_18+"px";
_21[0].firstChild.style.marginLeft="0px";
_21[0].firstChild.style.marginTop="0px";
this.legendDiv.appendChild(_21[0]);
_21[1].style.left=_17+"px";
_21[1].style.top="0px";
_21[1].style.width=(this.legendWidth-(2*_17))+"px";
_21[1].style.height=_18+"px";
_21[1].firstChild.style.marginLeft=-_17+"px";
_21[1].firstChild.style.marginTop="0px";
this.legendDiv.appendChild(_21[1]);
_21[2].style.left=(this.legendWidth-_17)+"px";
_21[2].style.top="0px";
_21[2].style.width=_17+"px";
_21[2].style.height=_18+"px";
_21[2].firstChild.style.marginLeft=-(_19-_17)+"px";
_21[2].firstChild.style.marginTop="0px";
this.legendDiv.appendChild(_21[2]);
_21[3].style.left="0px";
_21[3].style.top=_18+"px";
_21[3].style.width=_17+"px";
_21[3].style.height=(this.legendHeight-(2*_18))+"px";
_21[3].firstChild.style.marginLeft="0px";
_21[3].firstChild.style.marginTop=-_18+"px";
this.legendDiv.appendChild(_21[3]);
_21[4].style.left=_17+"px";
_21[4].style.top=_18+"px";
_21[4].style.width=(this.legendWidth-(2*_17))+"px";
_21[4].style.height=(this.legendHeight-(2*_18))+"px";
_21[4].firstChild.style.marginLeft=-_17+"px";
_21[4].firstChild.style.marginTop=-_18+"px";
this.legendDiv.appendChild(_21[4]);
_21[5].style.left=(this.legendWidth-_17)+"px";
_21[5].style.top=_18+"px";
_21[5].style.width=_17+"px";
_21[5].style.height=(this.legendHeight-(2*_18))+"px";
_21[5].firstChild.style.marginLeft=-(_19-_17)+"px";
_21[5].firstChild.style.marginTop=-_18+"px";
this.legendDiv.appendChild(_21[5]);
_21[6].style.left="0px";
_21[6].style.top=(this.legendHeight-_18)+"px";
_21[6].style.width=_17+"px";
_21[6].style.height=_18+"px";
_21[6].firstChild.style.marginLeft="0px";
_21[6].firstChild.style.marginTop=-(_1a-_18)+"px";
this.legendDiv.appendChild(_21[6]);
_21[7].style.left=_17+"px";
_21[7].style.top=(this.legendHeight-_18)+"px";
_21[7].style.width=(this.legendWidth-(2*_17))+"px";
_21[7].style.height=_18+"px";
_21[7].firstChild.style.marginLeft=-_17+"px";
_21[7].firstChild.style.marginTop=-(_1a-_18)+"px";
this.legendDiv.appendChild(_21[7]);
_21[8].style.left=(this.legendWidth-_17)+"px";
_21[8].style.top=(this.legendHeight-_18)+"px";
_21[8].style.width=_17+"px";
_21[8].style.height=_18+"px";
_21[8].firstChild.style.marginLeft=-(_19-_17)+"px";
_21[8].firstChild.style.marginTop=-(_1a-_18)+"px";
this.legendDiv.appendChild(_21[8]);
this.titleBarDiv=document.createElement("div");
this.titleBarDiv.unselectable="on";
this.titleBarDiv.style.MozUserSelect="none";
this.titleBarDiv.style.position="absolute";
this.titleBarDiv.style.overflow="hidden";
this.titleBarDiv.id="titleBarDiv";
this.titleBarDiv.style.left="10px";
this.titleBarDiv.style.top=_1f+"px";
this.titleBarDiv.style.width=((this.legendWidth-30)-_1d)+"px";
this.titleBarDiv.style.height="12px";
if(document.compatMode!="CSS1Compat"&&MQA.browser.name=="msie"){
this.titleBarDiv.style.height="18px";
}
this.titleBarDiv.style.padding="3px";
this.titleBarDiv.style.backgroundColor="#DADADA";
this.titleBarDiv.style.color="#000000";
this.titleBarDiv.style.fontSize="12px";
this.titleBarDiv.style.fontFamily="Arial";
this.titleBarDiv.style.lineHeight="90%";
this.titleBarDiv.style.cursor=this.map.grab_mousecursor;
this.updateLegendTime();
this.legendDiv.appendChild(this.titleBarDiv);
this.titleBarButtonDiv=document.createElement("div");
this.titleBarButtonDiv.unselectable="on";
this.titleBarButtonDiv.style.position="absolute";
this.titleBarButtonDiv.style.overflow="hidden";
this.titleBarButtonDiv.id="titleBarButtonDiv";
this.titleBarButtonDiv.style.left=((this.legendWidth-_1d)-10)+"px";
this.titleBarButtonDiv.style.top=(_1f+1)+"px";
this.titleBarButtonDiv.style.width=_1d+"px";
this.titleBarButtonDiv.style.height=_1e+"px";
this.titleBarButtonInsideDiv=document.createElement("div");
this.titleBarButtonInsideDiv.unselectable="on";
this.titleBarButtonInsideDiv.id="titleBarButtonInsideDiv";
this.titleBarButtonInsideDiv.style.width=_1b+"px";
this.titleBarButtonInsideDiv.style.height=_1c+"px";
this.titleBarButtonInsideDiv.style.background="url(\""+this.legendFrameImage+"\") no-repeat";
if(this._getCollapseDirection()=="up"){
var _24=-245;
var _25=-214;
}else{
var _24=-214;
var _25=-245;
}
this.titleBarButtonInsideDiv.style.marginLeft=(this.legendMode==0?_24:_25)+"px";
this.titleBarButtonInsideDiv.style.marginTop=-344+"px";
this.titleBarButtonDiv.appendChild(this.titleBarButtonInsideDiv);
this.legendDiv.appendChild(this.titleBarButtonDiv);
_1f+=_8+_1e;
this.refreshLinkDiv=document.createElement("div");
this.refreshLinkDiv.unselectable="on";
this.refreshLinkDiv.style.position="absolute";
this.refreshLinkDiv.id="refreshLinkDiv";
this.refreshLinkDiv.style.left="10px";
this.refreshLinkDiv.style.top=_1f+"px";
this.refreshLinkDiv.style.width="75px";
this.refreshLinkDiv.style.height=_a+"px";
this.refreshLinkDiv.style.cursor="pointer";
this.refreshLinkDiv.style.color="#0000FF";
this.refreshLinkDiv.style.fontSize="10px";
this.refreshLinkDiv.style.fontFamily="Arial";
this.refreshLinkDiv.style.textDecoration="underline";
this.refreshLinkDiv.innerHTML="Refresh Traffic";
this.refreshLinkDiv.style.display="none";
this.legendDiv.appendChild(this.refreshLinkDiv);
switch(_15){
case 0:
this.refreshLinkDiv.style.display="block";
var _26=document.createElement("div");
_26.unselectable="on";
_26.style.position="absolute";
_26.id="inrixMinFooterDiv";
_26.style.left=((this.legendWidth-130)-10)+"px";
_26.style.top=_1f+"px";
_26.style.width="130px";
_26.style.height="13px";
_26.style.cursor="pointer";
_26.style.color="#777777";
_26.style.fontSize="10px";
_26.style.fontFamily="Arial";
_26.innerHTML=_4;
this.legendDiv.appendChild(_26);
break;
case 1:
var _27=document.createElement("div");
_27.style.position="absolute";
_27.id="marketDiv";
_27.unselectable="on";
_27.style.MozUserSelect="none";
_27.style.width="170px";
_27.style.height="70px";
_27.style.left=(this.legendWidth-parseInt(_27.style.width))/2+"px";
_27.style.top="50px";
_27.style.fontSize="12px";
_27.style.fontFamily="Arial";
var s="<img src=\""+this.imageServerPath+"legend_stoplight.png\" width=\"21\" height=\"45\" align=\"left\" style=\"margin-right:4px; margin-bottom:15px;\"/>";
s+="Please <b>zoom in</b> to see<br/>";
s+="traffic conditions for<br/>";
s+="cities marked with a<br/>";
s+="traffic light.";
_27.innerHTML=s;
this.legendDiv.appendChild(_27);
break;
case 2:
this.refreshLinkDiv.style.display="block";
_1f+=_a+_8;
if(this.legendCheckboxes[0]||this.legendCheckboxes[1]||this.legendCheckboxes[2]){
var _29=37;
this.checkBoxContainerDiv=document.createElement("div");
this.checkBoxContainerDiv.unselectable="on";
this.checkBoxContainerDiv.style.position="absolute";
this.checkBoxContainerDiv.id="checkBoxContainerDiv";
this.checkBoxContainerDiv.style.left="10px";
this.checkBoxContainerDiv.style.top=_1f+"px";
this.checkBoxContainerDiv.style.width=(this.legendWidth-20)+"px";
this.checkBoxContainerDiv.style.height=_b+"px";
this.checkBoxContainerDiv.style.color="#000000";
this.checkBoxContainerDiv.style.fontSize="11px";
this.checkBoxContainerDiv.style.fontFamily="Arial";
this.checkBoxContainerDiv.innerHTML="<b>Show:</b>";
if(this.legendCheckboxes[0]){
var _2a=67;
this.incidentCheckDiv=document.createElement("div");
this.incidentCheckDiv.unselectable="on";
this.incidentCheckDiv.style.position="absolute";
this.incidentCheckDiv.id="incidentCheckDiv";
this.incidentCheckDiv.style.left=_29+"px";
this.incidentCheckDiv.style.top="-3px";
this.incidentCheckDiv.style.width=_2a+"px";
this.incidentCheckDiv.style.height="15px";
this.incidentCheckDiv.style.cursor="default";
this.incidentCheckDiv.innerHTML="<input id=\"incident\" type=\"checkbox\" checked=\"true\" style=\"vertical-align:middle\" /><label for=\"incident\">Incidents</label>";
this.checkBoxContainerDiv.appendChild(this.incidentCheckDiv);
_29+=_2a;
}
if(this.legendCheckboxes[1]){
var _2a=84;
this.constructionCheckDiv=document.createElement("div");
this.constructionCheckDiv.unselectable="on";
this.constructionCheckDiv.style.position="absolute";
this.constructionCheckDiv.id="constructionCheckDiv";
this.constructionCheckDiv.style.left=_29+"px";
this.constructionCheckDiv.style.top="-3px";
this.constructionCheckDiv.style.width=_2a+"px";
this.constructionCheckDiv.style.height="15px";
this.constructionCheckDiv.style.cursor="default";
this.constructionCheckDiv.innerHTML="<input id=\"construction\" type=\"checkbox\" checked=\"true\" style=\"vertical-align:middle\" /><label for=\"construction\">Construction</label>";
this.checkBoxContainerDiv.appendChild(this.constructionCheckDiv);
_29+=_2a;
}
if(this.legendCheckboxes[2]){
var _2a=60;
this.eventCheckDiv=document.createElement("div");
this.eventCheckDiv.unselectable="on";
this.eventCheckDiv.style.position="absolute";
this.eventCheckDiv.id="eventCheckDiv";
this.eventCheckDiv.style.left=_29+"px";
this.eventCheckDiv.style.top="-3px";
this.eventCheckDiv.style.width=_2a+"px";
this.eventCheckDiv.style.height="15px";
this.eventCheckDiv.style.cursor="default";
this.eventCheckDiv.innerHTML="<input id=\"event\" type=\"checkbox\" checked=\"true\" style=\"vertical-align:middle\" /><label for=\"event\">Events</label>";
this.checkBoxContainerDiv.appendChild(this.eventCheckDiv);
_29+=_2a;
}
this.legendDiv.appendChild(this.checkBoxContainerDiv);
_1f+=_b+_8;
}
if(this.legendSliderVisible){
this.slider=new MQA.SliderControl(this.legendDiv,this.legendWidth-23,_d,10,_1f,0,100,10,50,this.setFlowOpacityFromSlider);
this.slider.setValue("backgroundColor","#dadada");
this.slider.setValue("borderColor","transparent");
this.slider.setValue("backgroundOpacity",60);
this.slider.setValue("tooltip","Change Speed Opacity");
this.slider.parent=this;
this.slider.draw();
_1f+=_8+_d;
}else{
var _2b=document.createElement("div");
_2b.id="horizontalDividerDiv";
_2b.unselectable="on";
_2b.style.position="absolute";
_2b.style.left="10px";
_2b.style.top=_1f+"px";
_2b.style.width=(this.legendWidth-20)+"px";
_2b.style.height=_c+"px";
_2b.style.backgroundColor="#777777";
_2b.innerHTML="<img src=\""+_6+"\"/>";
this.legendDiv.appendChild(_2b);
_1f+=_8+1;
}
if(this.legendIconsVisible){
var _2c=_e;
var _2d=document.createElement("div");
_2d.unselectable="on";
_2d.style.position="absolute";
_2d.id="legendIconDiv";
_2d.style.left="20px";
_2d.style.top=_1f+"px";
_2d.style.cursor="default";
_2d.style.color="#000000";
_2d.style.fontSize="10px";
_2d.style.fontWeight="bold";
_2d.style.fontFamily="Arial";
var s="<b>Incidents:</b><br/>";
for(var i=0;i<this.legendIconImages.length;i++){
var _2e=" style=\"vertical-align:middle; margin-top:"+(i==0?3:2)+"px; ";
if(MQA.browser.name=="msie"&&MQA.browser.version<7){
_2e+="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.legendIconImages[i].imageURL+"', sizingMethod='image');"+"\"";
iURL=_6;
}else{
_2e+="\" ";
iURL=this.legendIconImages[i].imageURL;
}
s+="<img src=\""+iURL+"\" width=\""+this.legendIconImages[i].width+"\" height=\""+this.legendIconImages[i].height+"\"";
s+=_2e+" /> - ";
s+="<b>"+this.legendIconText[i]+"</b><br/>";
_2c+=this.legendIconImages[i].height+3;
}
_2d.innerHTML=s;
_2d.style.height=_2c+"px";
this.legendDiv.appendChild(_2d);
}
if(this.legendFlowVisible){
var _2f=_e;
var _30=document.createElement("div");
_30.unselectable="on";
_30.style.position="absolute";
_30.id="legendFlowColorDiv";
_30.style.left=parseInt(this.legendWidth/2)+"px";
_30.style.top=_1f+"px";
_30.style.cursor="default";
_30.style.color="#000000";
_30.style.fontSize="10px";
_30.style.fontWeight="bold";
_30.style.fontFamily="Arial";
var s="Speed:<br clear=\"all\"/>";
for(var i=0;i<this.legendFlowColors.length;i++){
s+="<div id=\"flowColorDiv\" style=\"position:absolute; left:0px; top:"+((i*_f)+15)+"px; width:15px; height:"+_f+"px;background-color:"+this.legendFlowColors[i]+";\">&nbsp;</div>";
s+="<div id=\"flowTextDiv\" style=\"position:absolute; left:16px; top:"+((i*_f)+15)+"px; width:125px; height:"+_f+"px;\">&nbsp;- "+this.legendFlowText[i]+"</div>";
_2f+=_f;
}
_30.innerHTML=s;
_30.style.height=_2f+"px";
this.legendDiv.appendChild(_30);
}
break;
case 3:
var _31=document.createElement("div");
_31.style.position="absolute";
_31.id="serviceDownDiv";
_31.unselectable="on";
_31.style.MozUserSelect="none";
_31.style.width="170px";
_31.style.height="70px";
_31.style.left=(this.legendWidth-parseInt(_31.style.width))/2+"px";
_31.style.top="50px";
_31.style.fontSize="12px";
_31.style.fontFamily="Arial";
_31.style.color="#B50E0E";
_31.style.fontWeight="bold";
var s="<img src=\""+this.imageServerPath+"legend_exclam_mark.png\" width=\"30\" height=\"30\" align=\"left\" style=\"margin-right:4px; margin-bottom:25px;\"/>";
s+="Our Traffic service is<br/>";
s+="currently not available<br/>";
s+="We apologize for any<br/>";
s+="inconvenience";
_31.innerHTML=s;
this.legendDiv.appendChild(_31);
break;
default:
this._drawLegend(2);
break;
}
if(_15!=0){
if(_15!=3){
var _32=document.createElement("div");
_32.unselectable="on";
_32.style.position="absolute";
_32.id="inrixFooterDiv";
_32.style.left="10px";
_32.style.top=(this.legendHeight-22)+"px";
_32.style.width="130px";
_32.style.height="15px";
_32.style.cursor="pointer";
_32.style.color="#000000";
_32.style.fontSize="11px";
_32.style.fontFamily="Arial";
_32.innerHTML=_4;
this.legendDiv.appendChild(_32);
}
if(this.legendHelpLinkVisible){
this.helpLinkDiv=document.createElement("div");
this.helpLinkDiv.unselectable="on";
this.helpLinkDiv.style.position="absolute";
this.helpLinkDiv.id="helpLinkDiv";
this.helpLinkDiv.style.left=((this.legendWidth-10)-60)+"px";
this.helpLinkDiv.style.top=(this.legendHeight-22)+"px";
this.helpLinkDiv.style.width="60px";
this.helpLinkDiv.style.height="15px";
this.helpLinkDiv.style.cursor="pointer";
this.helpLinkDiv.style.color="#0000FF";
this.helpLinkDiv.style.fontSize="11px";
this.helpLinkDiv.style.fontFamily="Arial";
this.helpLinkDiv.style.textDecoration="underline";
this.helpLinkDiv.innerHTML="Traffic Help";
this.legendDiv.appendChild(this.helpLinkDiv);
}
}
this.map.parent2.appendChild(this.legendDiv);
this.eTitleBarHandler=MQA._prEvent.EventCallback(this,"titleBarEventMonitor");
MQA._prEvent.observe(this.titleBarDiv,"mousedown",this.eTitleBarHandler);
MQA._prEvent.observe(this.titleBarDiv,"mouseup",this.eTitleBarHandler);
MQA._prEvent.observe(this.titleBarDiv,"mousemove",this.eTitleBarHandler);
this.eTitleBarButtonClick=MQA._prEvent.EventCallback(this,"titleBarButtonEventMonitor");
MQA._prEvent.observe(this.titleBarButtonDiv,"click",this.eTitleBarButtonClick);
if(this.refreshLinkDiv){
this.eRefreshLinkClick=MQA._prEvent.EventCallback(this,"refreshLinkEventMonitor");
MQA._prEvent.observe(this.refreshLinkDiv,"click",this.eRefreshLinkClick);
}
if(this.legendCheckboxes[0]||this.legendCheckboxes[1]||this.legendCheckboxes[2]){
this.eCheckBoxClick=MQA._prEvent.EventCallback(this,"checkBoxEventMonitor");
if(this.incidentCheckDiv){
MQA._prEvent.observe(this.incidentCheckDiv,"click",this.eCheckBoxClick);
}
if(this.constructionCheckDiv){
MQA._prEvent.observe(this.constructionCheckDiv,"click",this.eCheckBoxClick);
}
if(this.eventCheckDiv){
MQA._prEvent.observe(this.eventCheckDiv,"click",this.eCheckBoxClick);
}
}
if(this.helpLinkDiv){
this.eHelpLinkClick=MQA._prEvent.EventCallback(this,"helpLinkEventMonitor");
MQA._prEvent.observe(this.helpLinkDiv,"click",this.eHelpLinkClick);
}
};
this.updateLegendTime=function(){
this.titleBarDiv.innerHTML="<b unselectable=\"on\">Traffic</b> - as of "+this.getLastUpdateTime();
};
this._removeLegend=function(){
MQA._prEvent.stopObserving(this.titleBarDiv,"mousedown",this.eTitleBarHandler);
MQA._prEvent.stopObserving(this.titleBarDiv,"mouseup",this.eTitleBarHandler);
MQA._prEvent.stopObserving(this.titleBarDiv,"mousemove",this.eTitleBarHandler);
this.eTitleBarHandler=null;
MQA._prEvent.stopObserving(this.titleBarButtonDiv,"click",this.eTitleBarButtonClick);
this.eTitleBarButtonClick=null;
if(this.refreshLinkDiv){
MQA._prEvent.stopObserving(this.refreshLinkDiv,"click",this.eRefreshLinkClick);
this.eRefreshLinkClick=null;
}
if(this.incidentCheckDiv){
MQA._prEvent.stopObserving(this.incidentCheckDiv,"click",this.eCheckBoxClick);
}
if(this.constructionCheckDiv){
MQA._prEvent.stopObserving(this.constructionCheckDiv,"click",this.eCheckBoxClick);
}
if(this.eventCheckDiv){
MQA._prEvent.stopObserving(this.eventCheckDiv,"click",this.eCheckBoxClick);
}
this.eCheckBoxClick=null;
if(this.helpLinkDiv){
MQA._prEvent.stopObserving(this.helpLinkDiv,"click",this.eHelpLinkClick);
}
this.eHelpLinkClick=null;
if(this.slider){
this.slider.dispose(true);
this.slider=null;
}
this.titleBarDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.titleBarDiv);
MQA.Util._deleteDOMObject(this.titleBarDiv);
this.titleBarDiv=null;
this.titleBarButtonDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.titleBarButtonDiv);
MQA.Util._deleteDOMObject(this.titleBarButtonDiv);
this.titleBarButtonDiv=null;
this.titleBarButtonInsideDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.titleBarButtonInsideDiv);
MQA.Util._deleteDOMObject(this.titleBarButtonInsideDiv);
this.titleBarButtonInsideDiv=null;
this.refreshLinkDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.refreshLinkDiv);
MQA.Util._deleteDOMObject(this.refreshLinkDiv);
this.refreshLinkDiv=null;
if(this.incidentCheckDiv){
this.incidentCheckDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.incidentCheckDiv);
MQA.Util._deleteDOMObject(this.incidentCheckDiv);
this.incidentCheckDiv=null;
}
if(this.constructionCheckDiv){
this.constructionCheckDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.constructionCheckDiv);
MQA.Util._deleteDOMObject(this.constructionCheckDiv);
this.constructionCheckDiv=null;
}
if(this.eventCheckDiv){
this.eventCheckDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.eventCheckDiv);
MQA.Util._deleteDOMObject(this.eventCheckDiv);
this.eventCheckDiv=null;
}
if(this.checkBoxContainerDiv){
MQA.Util._deleteDOMObject(this.checkBoxContainerDiv);
this.checkBoxContainerDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.checkBoxContainerDiv);
this.checkBoxContainerDiv=null;
}
if(this.helpLinkDiv){
this.helpLinkDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.helpLinkDiv);
MQA.Util._deleteDOMObject(this.helpLinkDiv);
this.helpLinkDiv=null;
}
this.legendDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.legendDiv);
MQA.Util._deleteDOMObject(this.legendDiv);
this.legendDiv=null;
};
this.updateTrafficLegend=function(){
var _33=this.legendMode;
var _34=this._calculateCurrentLegendMode();
if(this.legendMode!=0&&_33!=_34){
this.setValue("legendMode",_34);
}
};
this.buttonEventMonitor=function(e){
switch(e.type){
case "mouseover":
if(!this.controlOn){
this.trafficButtonImage.style.left="-82px";
}
break;
case "mouseout":
if(!this.controlOn){
this.trafficButtonImage.style.left="0px";
}
break;
case "click":
if(this.controlOn){
this._removeLegend(true);
if(this.traffic.flowActive){
this.traffic.removeFlow();
}
if(this.traffic.incidentsActive){
this.traffic.removeIncidents();
}
if(this.traffic.marketsActive){
this.traffic.removeMarkets();
}
this.trafficButtonImage.style.left="0px";
e.eventName="MQA.TrafficControl.deactivate";
MQA.EventManager.trigger(this,"deactivate",e);
}else{
if(_3){
this.traffic.addFlow();
this.traffic.addMarkets();
this.traffic.addIncidents();
}
var _36=this._calculateCurrentLegendMode();
this.setValue("legendMode",_36);
if(!this.controlOn){
this._drawLegend(_36);
}
this.trafficButtonImage.style.left="-165px";
e.eventName="MQA.TrafficControl.activate";
MQA.EventManager.trigger(this,"activate",e);
}
this.controlOn=!this.controlOn;
break;
}
};
this.titleBarEventMonitor=function(e){
switch(e.type){
case "mousedown":
this.titleBarDiv.style.cursor=this.map.grabbing_mousecursor;
this.shapeStartX=parseInt(this.legendDiv.style.left);
this.shapeStartY=parseInt(this.legendDiv.style.top);
this.mouseStartX=e.clientX;
this.mouseStartY=e.clientY;
this.shape=this.legendDiv;
this.map.draggedObject=this;
this.isDragging=true;
break;
case "mouseup":
this.finishDrag();
break;
case "mousemove":
if(this.isDragging){
if(parseInt(this.legendDiv.style.left)<0){
this.finishDrag();
}
if(parseInt(this.legendDiv.style.top)<0){
this.finishDrag();
}
if(parseInt(this.legendDiv.style.left)>(this.map.width-(this.legendWidth+3))){
this.finishDrag();
}
if(parseInt(this.legendDiv.style.top)>(this.map.height-(this.legendHeight+3))){
this.finishDrag();
}
}
break;
}
};
this.finishDrag=function(){
this.titleBarDiv.style.cursor=this.map.grab_mousecursor;
this.map.draggedObject=null;
this.shape=null;
this.isDragging=false;
if(parseInt(this.legendDiv.style.left)<=0){
this.legendDiv.style.left="0px";
}
if(parseInt(this.legendDiv.style.top)<=0){
this.legendDiv.style.top="0px";
}
if(parseInt(this.legendDiv.style.left)>=(this.map.width-(this.legendWidth+3))){
this.legendDiv.style.left=this.map.width-(this.legendWidth+3)+"px";
}
if(parseInt(this.legendDiv.style.top)>=(this.map.height-(this.legendHeight+3))){
this.legendDiv.style.top=this.map.height-(this.legendHeight+3)+"px";
}
if(this._getCollapseDirection()=="up"){
this.legendPosition=new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT,new MQA.Size(parseInt(this.legendDiv.style.left),parseInt(this.legendDiv.style.top)));
this.titleBarButtonInsideDiv.style.marginLeft=(this.legendMode==0?-245:-214)+"px";
}else{
var _38=new MQA.Size(-(this.map.width-(parseInt(this.legendDiv.style.left)+this.legendWidth)),-(this.map.height-(parseInt(this.legendDiv.style.top)+this.legendHeight)));
this.legendPosition=new MQA.MapCornerPlacement(MQA.MapCorner.BOTTOM_RIGHT,_38);
this.titleBarButtonInsideDiv.style.marginLeft=(this.legendMode==0?-214:-245)+"px";
}
};
this.titleBarButtonEventMonitor=function(e){
if(this.legendMode!=0){
this.setValue("legendMode",0);
e.eventName="MQA.TrafficControl.legendClose";
MQA.EventManager.trigger(this,"legendclose",e);
}else{
this.setValue("legendMode",this._calculateCurrentLegendMode());
e.eventName="MQA.TrafficControl.legendOpen";
MQA.EventManager.trigger(this,"legendopen",e);
}
};
this.refreshLinkEventMonitor=function(e){
this.traffic.refresh();
this.updateLegendTime();
this.updateTrafficLegend();
e.eventName="MQA.TrafficControl.refreshClick";
MQA.EventManager.trigger(this,"refreshclick",e);
};
this.checkBoxEventMonitor=function(e){
var _3c=MQA._prEvent.element(e);
switch(_3c.id){
case "incident":
this.showIncidents=_3c.checked;
e.eventName="MQA.TrafficControl.incidentClick";
MQA.EventManager.trigger(this,"incidentclick",e);
break;
case "construction":
this.showConstruction=_3c.checked;
e.eventName="MQA.TrafficControl.constructionClick";
MQA.EventManager.trigger(this,"constructionclick",e);
break;
case "event":
this.showEvents=_3c.checked;
e.eventName="MQA.TrafficControl.eventClick";
MQA.EventManager.trigger(this,"eventclick",e);
break;
}
var _3d=(this.showIncidents?[MQA.TRAFFIC_INCIDENTS]:[]);
if(this.showConstruction){
_3d.push(MQA.TRAFFIC_CONSTRUCTION);
}
if(this.showEvents){
_3d.push(MQA.TRAFFIC_EVENTS);
}
this.traffic.setValue("incidentTypeFilter",_3d);
};
this.helpLinkEventMonitor=function(e){
e.eventName="MQA.TrafficControl.helpClick";
MQA.EventManager.trigger(this,"helpclick",e);
};
this.setFlowOpacityFromSlider=function(_3f){
this.parent.traffic.setValue("flowOpacity",_3f/100);
};
this._calculateLegendSize=function(_40){
var _41;
var _42=35;
if(this.legendCheckboxes[0]&&this.legendCheckboxes[1]&&this.legendCheckboxes[2]){
_41=265;
}else{
_41=232;
}
switch(_40){
case 0:
_42=60;
break;
case 1:
_42=187;
break;
case 2:
_42+=_9+_8;
_42+=_a+_8;
if(this.legendCheckboxes[0]||this.legendCheckboxes[1]||this.legendCheckboxes[2]){
_42+=14+_8;
}
if(this.legendSliderVisible){
_42+=_d+_8+2;
}else{
_42+=_c+_8+1;
}
var _43=(this.legendFlowVisible?(this.legendFlowColors.length*_f)+_e:0);
var _44=(this.legendIconsVisible?(this.legendIconImages.length*(this.legendIconImages[0].height+2))+_e:0);
_42+=(_43>_44?_43:_44);
break;
case 3:
_42=187;
break;
}
return new MQA.PointXY(_41,_42);
};
this._getCollapseDirection=function(){
if(parseInt(this.legendDiv.style.top)<(this.map.height-(parseInt(this.legendDiv.style.top)+this.legendHeight))){
return "up";
}else{
return "down";
}
};
this._calculateCurrentLegendMode=function(){
if(this.map.getZoomLevel()<=this.traffic.maxMarketZoomLevel&&this.traffic.available){
return 1;
}else{
if(this.map.getZoomLevel()>this.traffic.maxMarketZoomLevel&&this.traffic.available){
return 2;
}else{
return 3;
}
}
};
this._getPositionXY=function(mcp,_46){
_46=(typeof (_46)=="undefined"?"button":_46);
var w=(_46=="button"?this.getValue("width"):this.getValue("legendWidth"));
var h=(_46=="button"?this.getValue("height"):this.getValue("legendHeight"));
var _49,_4a;
var _4b=mcp.offsetSize.width;
var _4c=mcp.offsetSize.height;
switch(mcp.getMapCorner()){
case MQA.MapCorner.TOP_LEFT:
_49=0;
_4a=0;
if(_4b>(this.map.width-w)){
_4b=(this.map.width-w)-3;
}
break;
case MQA.MapCorner.TOP_RIGHT:
_49=this.map.width-w;
_4a=0;
break;
case MQA.MapCorner.BOTTOM_LEFT:
_49=0;
_4a=this.map.height-h;
if(_4b>(this.map.width-w)){
_4b=(this.map.width-w)-3;
}
break;
case MQA.MapCorner.BOTTOM_RIGHT:
_49=this.map.width-w;
_4a=this.map.height-h;
break;
}
_49+=_4b;
_4a+=_4c;
return new MQA.PointXY(_49,_4a);
};
this.getLastUpdateTime=function(f){
if(typeof (f)=="undefined"){
f="h:ip z";
}
if(this.traffic.lastUpdateTime){
f=f.replace("h",(this.traffic.lastUpdateTime.hours>12?this.traffic.lastUpdateTime.hours-12:(this.traffic.lastUpdateTime.hours==0?"12":this.traffic.lastUpdateTime.hours)));
f=f.replace("H",this.traffic.lastUpdateTime.hours);
f=f.replace("i",(this.traffic.lastUpdateTime.minutes<10?"0"+this.traffic.lastUpdateTime.minutes:this.traffic.lastUpdateTime.minutes));
f=f.replace("s",(this.traffic.lastUpdateTime.seconds<10?"0"+this.traffic.lastUpdateTime.seconds:this.traffic.lastUpdateTime.seconds));
f=f.replace("y",this.traffic.lastUpdateTime.year.toString().substr(2,2));
f=f.replace("Y",this.traffic.lastUpdateTime.year);
f=f.replace("m",this.traffic.lastUpdateTime.month);
f=f.replace("d",this.traffic.lastUpdateTime.day);
f=f.replace("p",(this.traffic.lastUpdateTime.hours>=12?"pm":"am"));
f=f.replace("z",this.traffic.lastUpdateTime.timeZone);
return f;
}else{
return "notime";
}
};
this.initialize=function(map){
this.map=map;
this.draw();
};
this.getWidth=function(){
return this.getValue("width");
};
this.getHeight=function(){
return this.getValue("height");
};
this.destructor=function(){
this.dispose(false);
};
this.getPosition=function(){
return this.getValue("position");
};
};

MQA.SliderControl=function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){
MQA.Base.call(this);
_1=(typeof (_1)!="undefined"?_1:document.body);
this.width=(typeof (_2)!="undefined"?_2:100);
this.height=(typeof (_3)!="undefined"?_3:20);
this.left=(typeof (_4)!="undefined"?_4:0);
this.top=(typeof (_5)!="undefined"?_5:0);
this.minValue=(typeof (_6)!="undefined"?_6:0);
this.maxValue=(typeof (_7)!="undefined"?_7:100);
this.increment=(typeof (_8)!="undefined"?_8:5);
this.start=(typeof (_9)!="undefined"?_9:0);
this.callback=(typeof (_a)!="undefined"?_a:null);
var _b=MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/";
this.backgroundColor="#FFFFCC";
this.borderColor="#000000";
this.backgroundOpacity=100;
this.handleIcon=new MQA.Icon(_b+"/slider_dot.png",20,20);
this.tooltip="";
var _c=0;
var _d=0;
var _e=0;
var _f=this.width;
var _10=false;
var _11=7;
this.ratio=0;
this.lastIncrement=this.start;
this._facio=function(key,_13){
switch(key){
}
};
this._duco=function(key){
switch(key){
}
};
this.draw=function(){
this.containerDiv=document.createElement("div");
this.containerDiv.id="containerDiv";
this.containerDiv.style.position="absolute";
this.containerDiv.unselectable="on";
this.containerDiv.style.MozUserSelect="none";
this.containerDiv.style.left=this.left+"px";
this.containerDiv.style.top=this.top+"px";
this.containerDiv.style.width=this.width+"px";
this.containerDiv.style.height=this.height+"px";
this.backgroundDiv=document.createElement("div");
this.backgroundDiv.id="backgroundDiv";
this.backgroundDiv.style.position="absolute";
this.backgroundDiv.unselectable="on";
this.backgroundDiv.style.MozUserSelect="none";
this.backgroundDiv.style.left="0px";
this.backgroundDiv.style.top="0px";
this.backgroundDiv.style.width=this.width+"px";
this.backgroundDiv.style.height=this.height+"px";
this.backgroundDiv.style.filter="alpha(opacity="+this.backgroundOpacity+")";
this.backgroundDiv.style.MozOpacity=this.backgroundOpacity/100;
this.backgroundDiv.style.opacity=this.backgroundOpacity/100;
this.backgroundDiv.style.backgroundColor=this.backgroundColor;
this.backgroundDiv.style.border="1px solid "+this.borderColor;
this.containerDiv.appendChild(this.backgroundDiv);
var _15=document.createElement("div");
_15.id="horizontalDivider";
_15.style.position="absolute";
_15.unselectable="on";
_15.style.MozUserSelect="none";
_15.style.left=_11+"px";
_15.style.top=Math.round(this.height/2)+"px";
if(document.compatMode!="CSS1Compat"&&MQA.browser.name=="msie"){
_15.style.top=(parseInt(_15.style.top)+2)+"px";
}
_15.style.width=(this.width-(_11*2))+"px";
_15.style.height="1px";
_15.style.backgroundColor="#888888";
_15.innerHTML="<img src=\""+MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/a/a\">";
this.containerDiv.appendChild(_15);
this.handleDiv=document.createElement("div");
this.handleDiv.id="handleDiv";
this.handleDiv.style.position="absolute";
this.handleDiv.unselectable="on";
this.handleDiv.style.MozUserSelect="none";
this.handleDiv.title=this.tooltip;
var _16=this.start/this.maxValue;
var _17=Math.round(_16*(this.width-10));
this.handleDiv.style.width=this.handleIcon.width+"px";
this.handleDiv.style.height=this.handleIcon.height+"px";
this.handleDiv.style.left=_17+"px";
this.handleDiv.style.top=Math.round((this.height/2)-(this.handleIcon.height/2)+1)+"px";
if(document.compatMode!="CSS1Compat"&&MQA.browser.name=="msie"){
this.handleDiv.style.top=(parseInt(this.handleDiv.style.top)+2)+"px";
}
if(MQA.browser.name=="msie"&&(MQA.browser.version<7)){
this.handleDiv.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.handleIcon.imageURL+"', sizingMethod='scale')";
}else{
this.handleDiv.style.background="url(\""+this.handleIcon.imageURL+"\") no-repeat";
}
this.containerDiv.appendChild(this.handleDiv);
_1.appendChild(this.containerDiv);
_e=_11-Math.round(parseInt(this.handleDiv.style.width)/2);
_f=parseInt(_15.style.width)-_e;
this.ratio=this.maxValue/parseInt(_15.style.width);
this.eHandleEventProcessor=MQA._prEvent.EventCallback(this,"handleEventProcessor");
MQA._prEvent.observe(this.handleDiv,"mousemove",this.eHandleEventProcessor);
MQA._prEvent.observe(this.handleDiv,"mousedown",this.eHandleEventProcessor);
MQA._prEvent.observe(this.handleDiv,"mouseup",this.eHandleEventProcessor);
MQA._prEvent.observe(this.handleDiv,"mouseout",this.eHandleEventProcessor);
};
this.dispose=function(_18){
var _18=(typeof (_18)!="undefined"?_18:true);
MQA._prEvent.stopObserving(this.handleDiv,"mousemove",this.eHandleEventProcessor);
MQA._prEvent.stopObserving(this.handleDiv,"mousedown",this.eHandleEventProcessor);
MQA._prEvent.stopObserving(this.handleDiv,"mouseup",this.eHandleEventProcessor);
MQA._prEvent.stopObserving(this.handleDiv,"mouseout",this.eHandleEventProcessor);
this.eHandleEventProcessor=null;
this.backgroundDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.backgroundDiv);
MQA.Util._deleteDOMObject(this.backgroundDiv);
this.backgroundDiv=null;
this.handleDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.handleDiv);
MQA.Util._deleteDOMObject(this.handleDiv);
this.handleDiv=null;
this.containerDiv.innerHTML=null;
MQA.Util._setOuterHTMLToEmptyString(this.containerDiv);
MQA.Util._deleteDOMObject(this.containerDiv);
this.containerDiv=null;
if(_18){
_1=null;
}
};
this.handleEventProcessor=function(e){
switch(e.type){
case "mousedown":
_d=parseInt(this.handleDiv.style.left);
_c=e.clientX;
_10=true;
break;
case "mouseup":
case "mouseout":
_10=false;
break;
case "mousemove":
if(_10){
var _1a=_d-(_c-e.clientX);
_1a=(_1a>=_e?_1a:_e);
_1a=(_1a<=_f?_1a:_f);
this.handleDiv.style.left=_1a+"px";
if(Math.abs(this.lastIncrement-(this.ratio*_1a))>this.increment){
if(this.callback){
var _1b=Math.round(this.ratio*_1a);
this.lastIncrement=_1b;
this.callback(_1b);
}else{
var mqe=new MQA.Event("MQA.SliderControl.update");
mqe.srcObject=this;
mqe.sliderValue=Math.round(this.ratio*_1a);
this.lastIncrement=mqe.sliderValue;
MQA.EventManager.trigger(this,"update",mqe);
}
}
}
break;
}
};
this.backgroundEventProcessor=function(e){
var _1e=e.clientX;
_1e=(_1e>=_e?_1e:_e);
_1e=(_1e<=_f?_1e:_f);
this.handleDiv.style.left=_1e+"px";
if(this.callback){
this.callback(mqe);
}else{
var mqe=new MQA.Event("MQA.SliderControl.click");
mqe.srcObject=this;
mqe.sliderValue=Math.round(this.ratio*_1e);
MQA.EventManager.trigger(this,"click",mqe);
}
};
};

MQA.GlobalTrafficProcessor=new function(){
this.trafficContainer=[];
this.trafficMarketData=null;
this.trafficIncidentData=null;
this.onTrafficMarketDataReturn=function(_1){
for(var i=0;i<this.trafficContainer.length;i++){
if(this.trafficContainer[i].guid==_1){
return this.trafficContainer[i].processMarketData(this.trafficMarketData);
}
}
};
this.onTrafficIncidentDataReturn=function(_3){
for(var i=0;i<this.trafficContainer.length;i++){
if(this.trafficContainer[i].guid==_3){
return this.trafficContainer[i].processIncidentData(this.trafficIncidentData);
}
}
};
this.addInstance=function(t){
this.trafficContainer.push(t);
};
};
MQA.Traffic=function(_6){
MQA.Base.call(this);
this.trafficServer=MQA.PROTOCOL+"//"+TRAFFSERVER;
this.timeoutDuration=10000;
this.guid=MQA.Util._getRandomGUID(10);
if(typeof (_6)!="undefined"){
this.map=_6;
_6.traffic=this;
}else{
this.map=null;
}
var _7=this.map;
this.available=true;
MQA.GlobalTrafficProcessor.addInstance(this);
this.flowImage=null;
this.flowOpacity=0.55;
this.flowActive=false;
this.marketsActive=false;
this.incidentsActive=false;
this.autoDisplay=false;
this.lastUpdateTime=null;
this.flowCollectionName="mqa.traffic_flow";
this.marketCollectionName="mqa.traffic_markets";
this.incidentCollectionName="mqa.traffic_incidents";
this.minIncidentZoomLevel=7;
this.maxIncidentZoomLevel=16;
this.maxMarketZoomLevel=6;
this.minMarketZoomLevel=2;
this.minFlowZoomLevel=7;
this.maxFlowZoomLevel=16;
this.flowCollection=new MQA.ShapeCollection();
this.flowCollection.setName(this.flowCollectionName);
this.flowCollection.setMaxZoomLevel(this.maxFlowZoomLevel);
this.flowCollection.setMinZoomLevel(this.minFlowZoomLevel);
this.marketCollection=null;
this.incidentCollection=null;
this.severityColors=[];
this.severityColors[0]="#FBEF69";
this.severityColors[1]="#FBEF69";
this.severityColors[2]="#FF9900";
this.severityColors[3]="#FF9900";
this.severityColors[4]="#E40404";
this.severityText=[];
this.severityText[0]="Minimal";
this.severityText[1]="Minimal";
this.severityText[2]="Moderate";
this.severityText[3]="Moderate";
this.severityText[4]="Severe";
this.infoWindowTitleTextColor=[];
this.infoWindowTitleTextColor[0]="#000000";
this.infoWindowTitleTextColor[1]="#000000";
this.infoWindowTitleTextColor[2]="#000000";
this.infoWindowTitleTextColor[3]="#000000";
this.infoWindowTitleTextColor[4]="#FFFFFF";
this.incidentIcons=[];
this.incidentIcons[0]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/incid_min.png",29,29);
this.incidentIcons[1]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/incid_min.png",29,29);
this.incidentIcons[2]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/incid_mod.png",29,29);
this.incidentIcons[3]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/incid_mod.png",29,29);
this.incidentIcons[4]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/incid_sev.png",29,29);
this.eventIcons=[];
this.eventIcons[0]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/event_min.png",29,29);
this.eventIcons[1]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/event_min.png",29,29);
this.eventIcons[2]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/event_mod.png",29,29);
this.eventIcons[3]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/event_mod.png",29,29);
this.eventIcons[4]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/event_sev.png",29,29);
this.constructionIcons=[];
this.constructionIcons[0]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/const_min.png",29,29);
this.constructionIcons[1]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/const_min.png",29,29);
this.constructionIcons[2]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/const_mod.png",29,29);
this.constructionIcons[3]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/const_mod.png",29,29);
this.constructionIcons[4]=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/const_sev.png",29,29);
this.marketIcon=new MQA.Icon(MQA.PROTOCOL+"//"+MQA.IMGHOST+".mqcdn.com/mqtraffic/stoplight.png",16,30);
this.maxInfoWindowWidth=285;
this.incidentTitleCallback=null;
this.incidentContentCallback=null;
this.marketTitleCallback=null;
this.marketContentCallback=null;
this.infoWindowTitleCallback=null;
this.incidentTypeFilter=[MQA.TRAFFIC_CONSTRUCTION,MQA.TRAFFIC_EVENTS,MQA.TRAFFIC_INCIDENTS];
this._facio=function(_8,_9){
switch(_8){
case "flowOpacity":
if(this.flowImage){
this.flowImage.setValue("imageOpacity",this.flowOpacity);
}
break;
case "incidentTypeFilter":
if(this.incidentsActive){
this.addIncidents();
}
break;
case "maxInfoWindowWidth":
if(this.marketsActive){
for(var i=0;i<this.marketCollection.getSize();i++){
this.marketCollection.getAt(i).setValue("maxInfoWindowWidth",_9);
}
}
if(this.incidentsActive){
for(var i=0;i<this.incidentCollection.getSize();i++){
this.incidentCollection.getAt(i).setValue("maxInfoWindowWidth",_9);
}
}
break;
}
};
this._duco=function(_b,_c){
};
this.addFlow=function(){
if(!this.map){
return;
}
if(this.flowActive){
this.map.removeShape(this.flowImage);
this.flowImage=null;
}
this.flowActive=true;
this.lastUpdateTime=MQA.Util.getCurrentDateObject();
var _d=new Object;
_d.centerPoint=this.map.getCenter();
_d.width=this.map.width+1024;
_d.height=this.map.height+1024;
_d.scale=this.map.getScale();
_d.left=-512;
_d.top=-512;
_d.bottom=_d.top+_d.height;
_d.right=_d.left+_d.width;
_d.src=this.trafficServer+"/traffic/flow?"+"lat="+_d.centerPoint.getLatitude()+"&lng="+_d.centerPoint.getLongitude()+"&width="+_d.width+"&height="+_d.height+"&scale="+_d.scale+"&key="+Key+"&rand="+(Math.random()*10);
this.flowImage=new MQA.ImageOverlay();
this.flowImage.setValue("imageURL",_d.src);
this.flowImage.setValue("imageOpacity",this.flowOpacity);
var _e=new MQA.LatLngCollection();
_e.add(this.map.pixToLL(new MQA.Point(_d.left,_d.top)));
_e.add(this.map.pixToLL(new MQA.Point(_d.right,_d.bottom)));
this.flowImage.setValue("shapePoints",_e);
this.flowCollection.removeAll();
this.flowCollection.add(this.flowImage);
if(!this.flowCollection.isOnMap()){
this.map.addShapeCollection(this.flowCollection);
}
if(this.flowImage.shape){
this.flowImage.shape.style.zIndex=-1;
}
var e=new MQA.Event("MQA.Traffic.flowAdded");
e.srcObject=this;
this.onFlowAdded(e);
};
this.removeFlow=function(){
if(!this.map){
return;
}
this.flowActive=false;
if(this.flowImage){
this.map.removeShape(this.flowImage,false);
this.flowImage=null;
}
var e=new MQA.Event("MQA.Traffic.flowRemoved");
e.srcObject=this;
this.onFlowRemoved(e);
};
this.onFlowAdded=function(e){
MQA.EventManager.trigger(this,"flowadded",e);
};
this.onFlowRemoved=function(e){
MQA.EventManager.trigger(this,"flowremoved",e);
};
this.addMarkets=function(){
if(this.marketsActive){
this.removeMarkets();
}
this.marketsActive=true;
this.lastUpdateTime=MQA.Util.getCurrentDateObject();
var _13=this.trafficServer+"/traffic/markets?format=json&var=MQA.GlobalTrafficProcessor.trafficMarketData&fn=null";
_13+="&rand="+Math.random();
var _14=[this.guid];
var _15=function(){
return MQA.GlobalTrafficProcessor["onTrafficMarketDataReturn"].apply(MQA.GlobalTrafficProcessor,_14);
};
this.marketCollection=new MQA.RemoteCollection(_13,new MQA.JSONDeserializer(_15));
this.marketCollection.setName(this.marketCollectionName);
this.marketCollection.setDeclutter(false);
this.marketCollection.setMaxZoomLevel(this.maxMarketZoomLevel);
this.marketCollection.setMinZoomLevel(this.minMarketZoomLevel);
MQA.EventManager.addListener(this.marketCollection,"dataloaded",this.processMarketCollection);
MQA.EventManager.addListener(this.marketCollection,"datatimeout",this.processMarketTimeout);
var e=new MQA.Event("MQA.Traffic.marketsAdded");
e.srcObject=this;
this.onMarketsAdded(e);
};
this.removeMarkets=function(){
this.marketsActive=false;
if(!this.map.getInfoWindow().isHidden()){
this.map.getInfoWindow().hide();
}
this.map.removeShapeCollection(this.marketCollectionName);
this.marketCollection.removeAll();
this.marketCollection=null;
var e=new MQA.Event("MQA.Traffic.marketsRemoved");
e.srcObject=this;
this.onMarketsRemoved(e);
};
this.processMarketData=function(_18){
var _19=[];
var _1a,_1b;
for(var x in _18){
_1a=new MQA.Poi(new MQA.LatLng(_18[x].latitude,_18[x].longitude),this.marketIcon);
if(this.marketTitleCallback){
_1a.setValue("infoTitleHTML",this.marketTitleCallback(_18[x]));
}else{
_1a.setValue("infoTitleHTML",_18[x].city+", "+_18[x].state);
}
if(this.marketContentCallback){
_1a.setValue("infoContentHTML",this.marketContentCallback(_18[x]));
}else{
_1a.setValue("infoContentHTML","Please zoom in to view traffic conditions.");
}
_1a.setValue("maxInfoWindowWidth");
_19.push(_1a);
}
return _19;
};
this.processMarketCollection=function(e){
_7.addShapeCollection(e.srcObject);
};
this.processMarketTimeout=function(e){
var e=new MQA.Event("MQA.Traffic.marketTimeout");
e.srcObject=this;
this.onMarketTimeout(e);
};
this.onMarketsAdded=function(e){
MQA.EventManager.trigger(this,"marketsadded",e);
};
this.onMarketsRemoved=function(e){
MQA.EventManager.trigger(this,"marketsremoved",e);
};
this.onMarketTimeout=function(e){
MQA.EventManager.trigger(this,"markettimeout",e);
};
this.addIncidents=function(){
if(this.incidentsActive){
this.removeIncidents();
}
this.incidentsActive=true;
this.lastUpdateTime=MQA.Util.getCurrentDateObject();
var _22=this._getMapRectInfo();
var _23=new MQA.RectLL(new MQA.LatLng(_22.ullat,_22.ullng),new MQA.LatLng(_22.lrlat,_22.lrlng));
var _24="&ullat="+_23.ul.lat+"&ullng="+_23.ul.lng+"&lrlat="+_23.lr.lat+"&lrlng="+_23.lr.lng;
var _25=this.trafficServer+"/traffic/incidents?format=json&key="+Key+"&var=MQA.GlobalTrafficProcessor.trafficIncidentData"+_24+"&fn=null";
_25+="&rand="+Math.random();
var _26=[this.guid];
var _27=function(){
return MQA.GlobalTrafficProcessor["onTrafficIncidentDataReturn"].apply(MQA.GlobalTrafficProcessor,_26);
};
this.incidentCollection=new MQA.RemoteCollection(_25,new MQA.JSONDeserializer(_27));
this.incidentCollection.setName(this.incidentCollectionName);
this.incidentCollection.setDeclutter(false);
this.incidentCollection.setMaxZoomLevel(this.maxIncidentZoomLevel);
this.incidentCollection.setMinZoomLevel(this.minIncidentZoomLevel);
MQA.EventManager.addListener(this.incidentCollection,"dataloaded",this.processIncidentCollection);
MQA.EventManager.addListener(this.incidentCollection,"datatimeout",this.processIncidentTimeout);
var e=new MQA.Event("MQA.Traffic.incidentsAdded");
e.srcObject=this;
this.onIncidentsAdded(e);
};
this.removeIncidents=function(){
this.incidentsActive=false;
if(!this.map.getInfoWindow().isHidden()){
this.map.getInfoWindow().hide();
}
this.map.removeShapeCollection(this.incidentCollectionName);
this.incidentCollection.removeAll();
this.incidentCollection=null;
var e=new MQA.Event("MQA.Traffic.incidentsRemoved");
e.srcObject=this;
this.onIncidentsRemoved(e);
};
this.processIncidentData=function(_2a){
if(this.incidentTypeFilter.length==0){
return [];
}
var _2b=[];
var _2c,_2d,_2e,_2f;
_2a=_2a.incidents;
for(var x in _2a){
_2a[x].severity=(_2a[x].severity<0||_2a[x].severity>4?0:_2a[x].severity);
if(!MQA.Util.inArray(_2a[x].incidentType,this.incidentTypeFilter)){
continue;
}
_2c=new MQA.Poi(new MQA.LatLng(_2a[x].latitude,_2a[x].longitude));
_2f="color:"+this.infoWindowTitleTextColor[_2a[x].severity]+";font-weight:bold;font-size:12px";
switch(_2a[x].incidentType){
case 1:
_2c.setValue("titleBackgroundColor",this.severityColors[_2a[x].severity]);
_2e="<span style=\""+_2f+"\">"+this.severityText[_2a[x].severity]+" Impact Construction</span>";
_2c.setValue("icon",this.constructionIcons[_2a[x].severity]);
break;
case 2:
_2c.setValue("titleBackgroundColor",this.severityColors[_2a[x].severity]);
_2e="<span style=\""+_2f+"\">"+this.severityText[_2a[x].severity]+" Impact Event</span>";
_2c.setValue("icon",this.eventIcons[_2a[x].severity]);
break;
case 4:
_2c.setValue("titleBackgroundColor",this.severityColors[_2a[x].severity]);
_2e="<span style=\""+_2f+"\">"+this.severityText[_2a[x].severity]+" Impact Incident</span>";
_2c.setValue("icon",this.incidentIcons[_2a[x].severity]);
break;
}
_2c.setValue("maxInfoWindowWidth",this.maxInfoWindowWidth);
if(this.infoWindowTitleCallback){
_2e=this.infoWindowTitleCallback(_2a[x]);
}
_2c.setValue("infoWindowTitleText",_2e);
if(this.incidentTitleCallback){
_2c.setValue("infoTitleHTML",this.incidentTitleCallback(_2a[x]));
}else{
_2c.setValue("infoTitleHTML",_2a[x].title);
}
if(this.incidentContentCallback){
_2c.setValue("infoContentHTML",this.incidentContentCallback(_2a[x]));
}else{
var s=_2a[x].description+"<br/><br/>";
s+="<b>Start Time:</b> "+_2a[x].startTime+"<br/>";
s+="<b>End Time:</b> "+_2a[x].endTime+"<br/>";
s+="(All times estimated)";
_2c.setValue("infoContentHTML",s);
}
_2b.push(_2c);
}
return _2b;
};
this.processIncidentCollection=function(e){
_7.addShapeCollection(e.srcObject);
};
this.processIncidentTimeout=function(e){
this.available=false;
var e=new MQA.Event("MQA.Traffic.incidentTimeout");
e.srcObject=this;
this.onIncidentTimeout(e);
};
this.onIncidentsAdded=function(e){
MQA.EventManager.trigger(this,"incidentsadded",e);
};
this.onIncidentsRemoved=function(e){
MQA.EventManager.trigger(this,"incidentsremoved",e);
};
this.onIncidentTimeout=function(e){
MQA.EventManager.trigger(this,"incidenttimeout",e);
};
this.isAvailable=function(){
this.getValue("available");
};
this.refresh=function(){
if(this.flowActive&&this.flowCollection.inZoomWindow()){
this.addFlow();
}
if(this.incidentsActive&&this.incidentCollection.inZoomWindow()){
this.addIncidents();
}
};
this._getMapRectInfo=function(){
if(!this.map){
return null;
}
var _37=512;
var _38=this.map.getDragOffset();
topTileX=-512;
topTileY=-512;
var _39=new MQA.Point(topTileX,topTileY);
var _3a=new MQA.Point(this.map.width+_37,this.map.height+_37);
var _3b=this.map.pixToLL(_39);
var _3c=this.map.pixToLL(_3a);
var _3d=new MQA.RectLL(_3b,_3c);
var _3e=_3a.x-_39.x;
var _3f=_3a.y-_39.y;
var _40=new Object;
_40.ullat=_3b.getLatitude();
_40.ullng=_3b.getLongitude();
_40.lrlat=_3c.getLatitude();
_40.lrlng=_3c.getLongitude();
_40.scale=this.map.getScale();
_40.width=_3e;
_40.height=_3f;
_40.left=topTileX-_38.x;
_40.top=topTileY-_38.y;
return _40;
};
};
MQA.TileMap.prototype.handleTraffic=function(_41){
_41=(typeof (_41)!="undefined"?_41:false);
if(this.traffic){
this.traffic.refresh();
if(typeof (this.controls[MQA.CONTROL_TRAFFIC])!="undefined"){
if(this.controls[MQA.CONTROL_TRAFFIC].controlOn){
this.controls[MQA.CONTROL_TRAFFIC].updateLegendTime();
if(_41){
this.controls[MQA.CONTROL_TRAFFIC].updateTrafficLegend();
}
}
}
}
};
MQA.TRAFFIC_CONSTRUCTION=1;
MQA.TRAFFIC_EVENTS=2;
MQA.TRAFFIC_INCIDENTS=4;

